================
@@ -3037,6 +3037,14 @@ class AnnotatingParser {
if (Style.isCSharp() && Tok.is(tok::ampamp))
return TT_BinaryOperator;
+ // The keyword `and` (tok::ampamp) is always binary, never a declarator.
+ // Not extended to `bitand` (tok::amp), which can be a reference.
+ if (Tok.is(tok::ampamp)) {
+ const auto *Info = Tok.Tok.getIdentifierInfo();
+ if (Info && Info->isCPlusPlusOperatorKeyword())
+ return TT_BinaryOperator;
----------------
owenca wrote:
This seems incorrect as `and` is an alternative of `&&` and can be a reference
too. See [here](https://godbolt.org/z/7sM59Ksbs).
https://github.com/llvm/llvm-project/pull/199112
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits