[clang] [clang][bytecode] Handle corner condition for sign negation (PR #176390)

via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 16 23:39:42 PST 2026


================
@@ -75,6 +75,11 @@ namespace shifts {
                           // ref-cxx17-warning {{shift count >= width of type}}
     (void)((long)c << __CHAR_BIT__);
 
+    c = 1 << (int)INT_MIN; // expected-warning {{shift count is negative}} \
+                           // cxx17-warning {{shift count is negative}} \
+                           // ref-warning {{shift count is negative}} \
+                           // ref-cxx17-warning {{shift count is negative}}
+
----------------
hax0kartik wrote:

Fixed

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


More information about the cfe-commits mailing list