Fix a case where Expr::isConstantInitializer would return true for an expression we can't support.  In a slightly amusing twist, the case in question was already in the clang regression tests marked as a valid construct.  <rdar://problem/10020074>



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147026 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/static-init.c b/test/Sema/static-init.c
index b4de927..ec6d1e8 100644
--- a/test/Sema/static-init.c
+++ b/test/Sema/static-init.c
@@ -19,5 +19,6 @@
 };
 
 union bar u[1];
-struct foo x = {(intptr_t) u}; // no-error
+struct foo x = {(intptr_t) u}; // expected-error {{initializer element is not a compile-time constant}}
 struct foo y = {(char) u}; // expected-error {{initializer element is not a compile-time constant}}
+intptr_t z = (intptr_t) u; // no-error