Sema::FinalizeDeclaratorGroup(): Tighten up the tentative definition rule when dealing with arrays.

Bug submitted by Eli.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46179 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/array-constraint.c b/test/Sema/array-constraint.c
index 8b2ce5e..3ed5215 100644
--- a/test/Sema/array-constraint.c
+++ b/test/Sema/array-constraint.c
@@ -24,7 +24,7 @@
   return a;
 }
 
-int foo[](void);  // expected-error {{variable has incomplete type 'int (*[])(void)'}} expected-error {{'foo' declared as array of functions}}
+int foo[](void);  // expected-error {{'foo' declared as array of functions}}
 int foo2[1](void);  // expected-error {{'foo2' declared as array of functions}}
 
 typedef int (*pfunc)(void);
diff --git a/test/Sema/incomplete-decl.c b/test/Sema/incomplete-decl.c
index e342ab8..047c242 100644
--- a/test/Sema/incomplete-decl.c
+++ b/test/Sema/incomplete-decl.c
@@ -9,7 +9,11 @@
 extern void d;
 extern struct foo e;
 
+int ary[];
+struct foo bary[]; // expected-error {{array has incomplete element type 'struct foo'}}
+
 void func() {
+  int ary[]; // expected-error{{variable has incomplete type 'int []'}}
   void b; // expected-error {{variable has incomplete type 'void'}}
   struct foo f; // expected-error {{variable has incomplete type 'struct foo'}}
 }