summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/shift.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Sema/shift.c')
-rw-r--r--clang/test/Sema/shift.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Sema/shift.c b/clang/test/Sema/shift.c
index d75b5462cf8..28407be079f 100644
--- a/clang/test/Sema/shift.c
+++ b/clang/test/Sema/shift.c
@@ -60,3 +60,9 @@ enum { b = (a << ashift) };
void test_pr5544() {
(void) (((1) > 63 && (1) < 128 ? (((unsigned long long) 1)<<((1)-64)) : (unsigned long long) 0)); // no-warning
}
+
+void test_shift_too_much(char x) {
+ if (0)
+ (void) (x >> 80); // no-warning
+ (void) (x >> 80); // expected-warning {{shift count >= width of type}}
+}
OpenPOWER on IntegriCloud