blob: 047c24266e38647811d8f0788914e6ff2d51860d [file] [log] [blame]
Steve Naroffd3cd1e52008-01-18 00:39:39 +00001// RUN: clang -fsyntax-only -verify %s
2
3void b; // expected-error {{variable has incomplete type 'void'}}
4struct foo f; // expected-error {{variable has incomplete type 'struct foo'}}
5
6static void c; // expected-error {{variable has incomplete type 'void'}}
7static struct foo g; // expected-error {{variable has incomplete type 'struct foo'}}
8
9extern void d;
10extern struct foo e;
11
Steve Naroff9a75f8a2008-01-18 20:40:52 +000012int ary[];
13struct foo bary[]; // expected-error {{array has incomplete element type 'struct foo'}}
14
Steve Naroffd3cd1e52008-01-18 00:39:39 +000015void func() {
Steve Naroff9a75f8a2008-01-18 20:40:52 +000016 int ary[]; // expected-error{{variable has incomplete type 'int []'}}
Steve Naroffd3cd1e52008-01-18 00:39:39 +000017 void b; // expected-error {{variable has incomplete type 'void'}}
18 struct foo f; // expected-error {{variable has incomplete type 'struct foo'}}
19}