Northover.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68991
91177308-0d34-0410-b5e6-
96231b3b80d8
return;
}
+ if (!VDecl->getType()->isArrayType() &&
+ RequireCompleteType(VDecl->getLocation(), VDecl->getType(),
+ diag::err_typecheck_decl_incomplete_type)) {
+ RealDecl->setInvalidDecl();
+ return;
+ }
+
const VarDecl *Def = 0;
if (VDecl->getDefinition(Def)) {
Diag(VDecl->getLocation(), diag::err_redefinition)
int h[];
int (*i)[] = &h+1; // expected-error {{arithmetic on pointer to incomplete type 'int (*)[]'}}
+struct bar j = {1}; // expected-error {{variable has incomplete type 'struct bar'}} \
+ expected-note {{forward declaration of 'struct bar'}}
+struct bar k;
+struct bar { int a; };
+