diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2017-05-02 01:06:16 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2017-05-02 01:06:16 +0000 |
commit | c190f96b7dbd1c3462a3cf7bd5faa6fb9866424d (patch) | |
tree | 6cb5f5690edf6968de12b262dc5f2959c8a826ef /clang/test/Sema/integer-overflow.c | |
parent | 899a75cefe941d44efed81b8e78de800205c8707 (diff) | |
download | bcm5719-llvm-c190f96b7dbd1c3462a3cf7bd5faa6fb9866424d.tar.gz bcm5719-llvm-c190f96b7dbd1c3462a3cf7bd5faa6fb9866424d.zip |
Revert r301785 (and r301787) because they caused PR32864.
The fix is that ExprEvaluatorBase::VisitInitListExpr should handle transparent exprs instead of exprs with one element. Fixing that uncovers one testcase failure because the AST for "constexpr _Complex float test2 = {1};" is wrong (the _Complex prvalue should not be const-qualified), and a number of test failures in test/OpenMP where the captured stmt contains an InitListExpr that is in syntactic form.
llvm-svn: 301891
Diffstat (limited to 'clang/test/Sema/integer-overflow.c')
-rw-r--r-- | clang/test/Sema/integer-overflow.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/test/Sema/integer-overflow.c b/clang/test/Sema/integer-overflow.c index b2b7903e516..62ee33e3d18 100644 --- a/clang/test/Sema/integer-overflow.c +++ b/clang/test/Sema/integer-overflow.c @@ -149,16 +149,16 @@ uint64_t check_integer_overflows(int i) { // expected-warning@+2 {{overflow in expression; result is 536870912 with type 'int'}} uint64_t *b; - (void)b[4608 * 1024 * 1024]; + uint64_t b2 = b[4608 * 1024 * 1024] + 1; // expected-warning@+1 2{{overflow in expression; result is 536870912 with type 'int'}} - (void)(i ? (4608 * 1024 * 1024) : (4608 * 1024 * 1024)); + int j1 = i ? (4608 * 1024 * 1024) : (4608 * 1024 * 1024); // expected-warning@+1 {{overflow in expression; result is 536870912 with type 'int'}} - (void)(-(4608 * 1024 * 1024)); + int j2 = -(4608 * 1024 * 1024); // expected-warning@+1 {{overflow in expression; result is 536870912 with type 'int'}} - (void)b[4608 * 1024 * 1024]; + uint64_t j3 = b[4608 * 1024 * 1024]; // expected-warning@+1 2{{overflow in expression; result is 536870912 with type 'int'}} return ((4608 * 1024 * 1024) + ((uint64_t)(4608 * 1024 * 1024))); |