Refactoring and test for r143360. Support for array rvalue to pointer decay is
needed for C++11, and will follow later.
llvm-svn: 143363
diff --git a/clang/test/Sema/const-eval.c b/clang/test/Sema/const-eval.c
index 8cfa7ea..df56b06 100644
--- a/clang/test/Sema/const-eval.c
+++ b/clang/test/Sema/const-eval.c
@@ -92,3 +92,6 @@
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}}