================
@@ -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}}
+
----------------
tbaederr wrote:
```suggestion
c = 1 << (int)INT_MIN; // all-warning {{shift count is negative}}
```
https://github.com/llvm/llvm-project/pull/176390
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits