Add some more checking for compound literals.
llvm-svn: 51300
diff --git a/clang/test/Sema/compound-literal.c b/clang/test/Sema/compound-literal.c
index 8365724..3a41922 100644
--- a/clang/test/Sema/compound-literal.c
+++ b/clang/test/Sema/compound-literal.c
@@ -21,4 +21,8 @@
  fooFunc(&(struct foo){ 1, 2 });
 }
 
-
+struct Incomplete;
+struct Incomplete* I1 = &(struct Incomplete){1, 2, 3}; // -expected-error {{variable has incomplete type}}
+void IncompleteFunc(unsigned x) {
+  struct Incomplete* I2 = (struct foo[x]){1, 2, 3}; // -expected-error {{variable-sized object may not be initialized}}
+}