1 // RUN: clang-cc -fsyntax-only -verify %s
3 struct foo
; // expected-note 4 {{forward declaration of 'struct foo'}}
5 void b
; // expected-error {{variable has incomplete type 'void'}}
6 struct foo f
; // expected-error{{tentative definition has type 'struct foo' that is never completed}}
8 static void c
; // expected-error {{variable has incomplete type 'void'}}
9 static struct foo g
; // expected-error {{variable has incomplete type 'struct foo'}}
14 int ary
[]; // expected-warning {{tentative array definition assumed to have one element}}
15 struct foo bary
[]; // expected-error {{array has incomplete element type 'struct foo'}}
18 int ary
[]; // expected-error{{variable has incomplete type 'int []'}}
19 void b
; // expected-error {{variable has incomplete type 'void'}}
20 struct foo f
; // expected-error {{variable has incomplete type 'struct foo'}}
23 int h
[]; // expected-warning {{tentative array definition assumed to have one element}}
24 int (*i
)[] = &h
+1; // expected-error {{arithmetic on pointer to incomplete type 'int (*)[]'}}
26 struct bar j
= {1}; // expected-error {{variable has incomplete type 'struct bar'}} \
27 expected
-note
{{forward declaration of
'struct bar'}}
29 struct bar
{ int a
; };