summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2011-03-01 18:09:31 +0000
committerTed Kremenek <kremenek@apple.com>2011-03-01 18:09:31 +0000
commit63657fe995f2d30bc40816bb38836f5387bd881d (patch)
tree9c82584c241658df883c25a47e5ed49b3916a777 /clang/test
parent315c1675e8ed558aa827f56af260c85e03f07477 (diff)
downloadbcm5719-llvm-63657fe995f2d30bc40816bb38836f5387bd881d.tar.gz
bcm5719-llvm-63657fe995f2d30bc40816bb38836f5387bd881d.zip
Don't wanr about "negative shifts" in code that is unreachable. Fixes PR 5544.
llvm-svn: 126762
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Sema/shift.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/Sema/shift.c b/clang/test/Sema/shift.c
index df6b1141bdf..d75b5462cf8 100644
--- a/clang/test/Sema/shift.c
+++ b/clang/test/Sema/shift.c
@@ -56,3 +56,7 @@ void test() {
#define ashift 8
enum { b = (a << ashift) };
+// Don't warn for negative shifts in code that is unreachable.
+void test_pr5544() {
+ (void) (((1) > 63 && (1) < 128 ? (((unsigned long long) 1)<<((1)-64)) : (unsigned long long) 0)); // no-warning
+}
OpenPOWER on IntegriCloud