diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-03-01 19:13:22 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-03-01 19:13:22 +0000 |
commit | 26bbc3d4947f6efe18c22f709e242d8ef4480728 (patch) | |
tree | 265db73d43aa5c9991eb4f72725ab55505012c02 /clang/test/Sema/shift.c | |
parent | 90aa594c5e2138dbaa330dfc08cc21218cda5af4 (diff) | |
download | bcm5719-llvm-26bbc3d4947f6efe18c22f709e242d8ef4480728.tar.gz bcm5719-llvm-26bbc3d4947f6efe18c22f709e242d8ef4480728.zip |
Don't warning about shifting by too many bits in dead code.
llvm-svn: 126770
Diffstat (limited to 'clang/test/Sema/shift.c')
-rw-r--r-- | clang/test/Sema/shift.c | 6 |
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}} +} |