[clang] [clang-format] Fix annotation of alternative operator and (PR #199112)

via cfe-commits cfe-commits at lists.llvm.org
Sat Jun 27 19:33:45 PDT 2026


owenca wrote:

> But even though `and` is apparently just the same as `&&` I still think we should just annotate it as `BinaryOperator`, as this is the only sane usage.

It seems that `and` (and `bitand`) was added in C++98 for keyboards and character sets that lacked `&`, so it should be annotated exactly like `&&`. Besides, this patch still leaves the `&&` in `foo ? a < b && c : bar;` annotated incorrectly.

https://github.com/llvm/llvm-project/pull/199112


More information about the cfe-commits mailing list