diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2017-04-27 07:11:09 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2017-04-27 07:11:09 +0000 |
commit | 20edee6a3e4f077da25360edebb8180afebb03ed (patch) | |
tree | 0a12cd32e0f344745c095db07cf5069732d4924c /clang/test/Sema/integer-overflow.c | |
parent | 0f8f177682ddd91e7fe84595170d8e4986516e3b (diff) | |
download | bcm5719-llvm-20edee6a3e4f077da25360edebb8180afebb03ed.tar.gz bcm5719-llvm-20edee6a3e4f077da25360edebb8180afebb03ed.zip |
In the expression evaluator, descend into both the true and false expressions of a ConditionalOperator when the condition can't be evaluated and we're in an evaluation mode that says we should continue evaluating.
llvm-svn: 301520
Diffstat (limited to 'clang/test/Sema/integer-overflow.c')
-rw-r--r-- | clang/test/Sema/integer-overflow.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/Sema/integer-overflow.c b/clang/test/Sema/integer-overflow.c index e74bc119798..12d2c4f29e0 100644 --- a/clang/test/Sema/integer-overflow.c +++ b/clang/test/Sema/integer-overflow.c @@ -148,6 +148,9 @@ uint64_t check_integer_overflows(int i) { a[4608 * 1024 * 1024] = 1i; // expected-warning@+1 2{{overflow in expression; result is 536870912 with type 'int'}} + (void)((i ? (4608 * 1024 * 1024) : (4608 * 1024 * 1024)) + 1); + +// expected-warning@+1 2{{overflow in expression; result is 536870912 with type 'int'}} return ((4608 * 1024 * 1024) + ((uint64_t)(4608 * 1024 * 1024))); } |