diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-31 20:57:44 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-31 20:57:44 +0000 |
commit | dd78544d4474154fa8ee097aed3d6c5b2dff72f5 (patch) | |
tree | 348f84a4812c8babf47713f85a3fccafc7d5e15e /clang/test/Sema/const-eval.c | |
parent | 4f8e86979a7ffe0e02c2c9afacdc75c83f52ee88 (diff) | |
download | bcm5719-llvm-dd78544d4474154fa8ee097aed3d6c5b2dff72f5.tar.gz bcm5719-llvm-dd78544d4474154fa8ee097aed3d6c5b2dff72f5.zip |
Refactoring and test for r143360. Support for array rvalue to pointer decay is
needed for C++11, and will follow later.
llvm-svn: 143363
Diffstat (limited to 'clang/test/Sema/const-eval.c')
-rw-r--r-- | clang/test/Sema/const-eval.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/test/Sema/const-eval.c b/clang/test/Sema/const-eval.c index 8cfa7ea6f87..df56b06e48c 100644 --- a/clang/test/Sema/const-eval.c +++ b/clang/test/Sema/const-eval.c @@ -92,3 +92,6 @@ double d2 = ++d; // expected-error {{not a compile-time constant}} int n = 2; int intLvalue[*(int*)((long)&n ?: 1)] = { 1, 2 }; // expected-error {{variable length array}} + +union u { int a; char b[4]; }; +char c = ((union u)(123456)).b[0]; // expected-error {{not a compile-time constant}} |