summaryrefslogtreecommitdiff
path: root/test/Sema/array-constraint.c
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2007-08-28 18:45:29 +0000
committerSteve Naroff <snaroff@apple.com>2007-08-28 18:45:29 +0000
commit53a3234f4bc3fd5c7e2403321bff9c907e1f2de6 (patch)
treeb166d362612fdd003bbf22d7cef463b64c1dbc46 /test/Sema/array-constraint.c
parentba61556d56cc1b10dc0c068f3f55add7478f37ff (diff)
downloadclang-53a3234f4bc3fd5c7e2403321bff9c907e1f2de6.tar.gz
Move the "invalid decl" idiom up to Decl (where we have some bits to steal:-)
Converted ParmVarDecl, FileVarDecl, BlockVarDecl, and Sema::ParseIdentifierExpr() to use the idiom. Updated array-constraint.c to make sure we no longer get "undeclared identifier" errors:-) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41552 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/array-constraint.c')
-rw-r--r--test/Sema/array-constraint.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Sema/array-constraint.c b/test/Sema/array-constraint.c
index b1095bdc19..4d1c2f1600 100644
--- a/test/Sema/array-constraint.c
+++ b/test/Sema/array-constraint.c
@@ -5,6 +5,12 @@ struct s* t (struct s z[]) { // expected-error {{array has incomplete element
return z;
}
+void ff() {
+ struct s v, *p; // expected-error {{variable has incomplete type 'struct s'}}
+
+ p = &v;
+}
+
void *k (void l[2]) { // expected-error {{array has incomplete element type}}
return l;
}