Add type checking for tentative definitions at the end of the
translation unit.
Thread the various declarations of variables via
VarDecl::getPreviousDeclaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66601 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/init.c b/test/Sema/init.c
index 1f84e41..6f592b8 100644
--- a/test/Sema/init.c
+++ b/test/Sema/init.c
@@ -74,7 +74,8 @@
};
// PR3001
-struct s1 s2 = {
+struct s1 s2 = { // expected-error{{tentative definition has type 'struct s1' that is never completed}} \
+ // expected-note{{forward declaration of 'struct s1'}}
.a = sizeof(struct s3), // expected-error {{invalid application of 'sizeof'}} \
// expected-note{{forward declaration of 'struct s3'}}
.b = bogus // expected-error {{use of undeclared identifier 'bogus'}}