commit | 76d4e43063787229c8aba6db938245266636d20e | [log] [tgz] |
---|---|---|
author | Eli Friedman <eli.friedman@gmail.com> | Thu Sep 29 21:49:34 2011 +0000 |
committer | Eli Friedman <eli.friedman@gmail.com> | Thu Sep 29 21:49:34 2011 +0000 |
tree | 3f9d016d134cf2c538bd07cacddc30731527dce2 | |
parent | a9b68f4dd6c99620f306309583ab114c2ae36160 [diff] [blame] |
PR11040: CheckICE should not allow an lvalue bitcast as part of an integer constant expression. llvm-svn: 140812
diff --git a/clang/test/SemaCXX/i-c-e-cxx.cpp b/clang/test/SemaCXX/i-c-e-cxx.cpp index 186e321..4ebdada 100644 --- a/clang/test/SemaCXX/i-c-e-cxx.cpp +++ b/clang/test/SemaCXX/i-c-e-cxx.cpp
@@ -54,4 +54,6 @@ int foo() { return A::B; } } - +// PR11040 +const int x = 10; +int* y = reinterpret_cast<const char&>(x); // expected-error {{cannot initialize}}