diff options
Diffstat (limited to 'test/Sema/shift.c')
-rw-r--r-- | test/Sema/shift.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/Sema/shift.c b/test/Sema/shift.c index 47744fb049..63c9538249 100644 --- a/test/Sema/shift.c +++ b/test/Sema/shift.c @@ -20,6 +20,9 @@ void test() { c = 1 >> -0; c = 1 << -1; // expected-warning {{shift count is negative}} c = 1 >> -1; // expected-warning {{shift count is negative}} + c = 1 << (unsigned)-1; // expected-warning {{shift count >= width of type}} + // expected-warning@-1 {{implicit conversion}} + c = 1 >> (unsigned)-1; // expected-warning {{shift count >= width of type}} c = 1 << c; c <<= 0; c >>= 0; |