================ @@ -45,8 +45,8 @@ void test(boolean a, boolean b, int *p, volatile int *q, int i) { b = bar() & (i > 4); b = (i == 7) & foo(); #ifdef __cplusplus - b = foo() bitand bar(); // expected-warning {{use of bitwise '&' with boolean operands}} - // expected-note@-1 {{cast one or both operands to int to silence this warning}} + b = foo() bitand bar(); // Ok, no warning expected + ---------------- AaronBallman wrote:
You should also add test coverage for C with a macro definition for `bitand` and `bitor`, and it'd be good to add a test (both C and C++) that does something like: ``` #define my_fancy_bit_and & b = foo() my_fancy_bit_and bar(); ``` to show this intentionally works with user-defined macros as well. https://github.com/llvm/llvm-project/pull/81976 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits