diff options
author | Steve Naroff <snaroff@apple.com> | 2008-01-18 00:39:39 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2008-01-18 00:39:39 +0000 |
commit | b716fbab44ce514c8071d7f6ce1ed7f714b0e105 (patch) | |
tree | 7adf7d7046999834fbf1c46c4ea274b268b55e28 /clang/test/Sema/incomplete-decl.c | |
parent | 1989d2569b723f60dec107242e7637c8ede0c99e (diff) | |
download | bcm5719-llvm-b716fbab44ce514c8071d7f6ce1ed7f714b0e105.tar.gz bcm5719-llvm-b716fbab44ce514c8071d7f6ce1ed7f714b0e105.zip |
Sema::FinalizeDeclaratorGroup()...make sure we emit an diagnostic for tentative definitions with incomplete types. Touch up all test cases that are effected.
llvm-svn: 46152
Diffstat (limited to 'clang/test/Sema/incomplete-decl.c')
-rw-r--r-- | clang/test/Sema/incomplete-decl.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/Sema/incomplete-decl.c b/clang/test/Sema/incomplete-decl.c new file mode 100644 index 00000000000..e342ab8b70c --- /dev/null +++ b/clang/test/Sema/incomplete-decl.c @@ -0,0 +1,15 @@ +// RUN: clang -fsyntax-only -verify %s + +void b; // expected-error {{variable has incomplete type 'void'}} +struct foo f; // expected-error {{variable has incomplete type 'struct foo'}} + +static void c; // expected-error {{variable has incomplete type 'void'}} +static struct foo g; // expected-error {{variable has incomplete type 'struct foo'}} + +extern void d; +extern struct foo e; + +void func() { + void b; // expected-error {{variable has incomplete type 'void'}} + struct foo f; // expected-error {{variable has incomplete type 'struct foo'}} +} |