diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-01-31 01:47:46 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-01-31 01:47:46 +0000 |
commit | 006bfc91e8145a10e45d647352186015550c8d06 (patch) | |
tree | db1a3ce6045d080b82d6d1075250745601477663 /clang/test/CXX/expr/expr.const/p2-0x.cpp | |
parent | a4237652d223dc37c8d84bc12788422f3aa979f9 (diff) | |
download | bcm5719-llvm-006bfc91e8145a10e45d647352186015550c8d06.tar.gz bcm5719-llvm-006bfc91e8145a10e45d647352186015550c8d06.zip |
constexpr: remove integral conversion overflow checking introduced in r149286.
As Eli points out, this is implementation-defined, and the way we define it
makes this fine.
llvm-svn: 149327
Diffstat (limited to 'clang/test/CXX/expr/expr.const/p2-0x.cpp')
-rw-r--r-- | clang/test/CXX/expr/expr.const/p2-0x.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/CXX/expr/expr.const/p2-0x.cpp b/clang/test/CXX/expr/expr.const/p2-0x.cpp index 4b425da73c2..5659273129a 100644 --- a/clang/test/CXX/expr/expr.const/p2-0x.cpp +++ b/clang/test/CXX/expr/expr.const/p2-0x.cpp @@ -118,8 +118,8 @@ namespace UndefinedBehavior { void f(int n) { switch (n) { case (int)4.4e9: // expected-error {{constant expression}} expected-note {{value 4.4E+9 is outside the range of representable values of type 'int'}} - case (int)10000000000ll: // expected-error {{constant expression}} expected-note {{value 10000000000 is outside the range of representable values of type 'int'}} expected-note {{here}} - case (int)0x80000000u: // expected-error {{constant expression}} expected-note {{value 2147483648 is outside the range of representable values of type 'int'}} + case (int)0x80000000u: // ok + case (int)10000000000ll: // expected-note {{here}} case (unsigned int)10000000000ll: // expected-error {{duplicate case value}} case (int)(unsigned)(long long)4.4e9: // ok case (int)(float)1e300: // expected-error {{constant expression}} expected-note {{value 1.0E+300 is outside the range of representable values of type 'float'}} |