[clang] [Clang] add additional tests for -Wshift-bool (PR #130339)
Oleksandr T. via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 11 08:18:35 PDT 2025
================
@@ -22,4 +23,6 @@ void t() {
if ((y << 1) != 0) { }
if ((y >> 1) != 0) { } // expected-warning {{right shifting a 'bool' implicitly converts it to 'int'}}
+
+ bool k = (x < z) >> 1; // expected-warning {{right shifting a 'bool' implicitly converts it to 'int'}}
----------------
a-tarasyuk wrote:
@AaronBallman thank you for the review. I've added the `c` test. would you mind taking a look to see if it's sufficient?
https://github.com/llvm/llvm-project/pull/130339
More information about the cfe-commits
mailing list