1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 struct foo
; // expected-note 5 {{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-warning {{tentative definition of variable with internal linkage has incomplete non-array type 'struct foo'}} \
10 expected
-error
{{tentative definition has type
'struct foo' that is never completed
}}
15 int ary
[]; // expected-warning {{tentative array definition assumed to have one element}}
16 struct foo bary
[]; // expected-error {{array has incomplete element type 'struct foo'}}
19 int ary
[]; // expected-error{{definition of variable with array type needs an explicit size or an initializer}}
20 void b
; // expected-error {{variable has incomplete type 'void'}}
21 struct foo f
; // expected-error {{variable has incomplete type 'struct foo'}}
24 int h
[]; // expected-warning {{tentative array definition assumed to have one element}}
25 int (*i
)[] = &h
+1; // expected-error {{arithmetic on a pointer to an incomplete type 'int[]'}}
27 struct bar j
= {1}; // expected-error {{variable has incomplete type 'struct bar'}} \
28 expected
-note
{{forward declaration of
'struct bar'}}
30 struct bar
{ int a
; };