diff options
Diffstat (limited to 'clang/test/Sema')
-rw-r--r-- | clang/test/Sema/const-eval.c | 2 | ||||
-rw-r--r-- | clang/test/Sema/integer-overflow.c | 1 | ||||
-rw-r--r-- | clang/test/Sema/switch-1.c | 3 |
3 files changed, 5 insertions, 1 deletions
diff --git a/clang/test/Sema/const-eval.c b/clang/test/Sema/const-eval.c index bfb58bc573e..7c2cd0efd5e 100644 --- a/clang/test/Sema/const-eval.c +++ b/clang/test/Sema/const-eval.c @@ -129,7 +129,7 @@ extern struct Test50S Test50; EVAL_EXPR(50, &Test50 < (struct Test50S*)((unsigned)&Test50 + 10)) // expected-error {{must have a constant size}} // <rdar://problem/11874571> -EVAL_EXPR(51, 0 != (float)1e99) +EVAL_EXPR(51, 0 != (float)1e38) // PR21945 void PR21945() { int i = (({}), 0l); } diff --git a/clang/test/Sema/integer-overflow.c b/clang/test/Sema/integer-overflow.c index 44fbcd4c818..8f74873ed94 100644 --- a/clang/test/Sema/integer-overflow.c +++ b/clang/test/Sema/integer-overflow.c @@ -7,6 +7,7 @@ uint64_t f1(uint64_t, uint32_t); uint64_t f2(uint64_t, ...); static const uint64_t overflow = 1 * 4608 * 1024 * 1024; // expected-warning {{overflow in expression; result is 536870912 with type 'int'}} +// expected-error@-1 {{not a compile-time constant}} uint64_t check_integer_overflows(int i) { // expected-warning@+1 {{overflow in expression; result is 536870912 with type 'int'}} diff --git a/clang/test/Sema/switch-1.c b/clang/test/Sema/switch-1.c index 144c3607f57..0d31a191c4f 100644 --- a/clang/test/Sema/switch-1.c +++ b/clang/test/Sema/switch-1.c @@ -55,5 +55,8 @@ int f(int i) { // rdar://18405357 unsigned long long l = 65536 * 65536; // expected-warning {{overflow in expression; result is 0 with type 'int'}} +#ifndef __cplusplus +// expected-error@-2 {{not a compile-time constant}} +#endif unsigned long long l2 = 65536 * (unsigned)65536; unsigned long long l3 = 65536 * 65536ULL; |