diff options
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'}} +} |