blob: a6d1a22a9157399f5a10b75f5065f130dcb7b333 [file] [log] [blame]
Fariborz Jahanianfa601d52007-10-04 00:22:33 +00001// RUN: clang -fsyntax-only -verify %s
2
Fariborz Jahanian023a4392007-09-14 16:27:55 +00003struct S;
4typedef int FOO();
5
6@interface INTF
7{
8 struct F {} JJ;
9 int arr[]; // expected-error {{field 'arr' has incomplete type}}
10 struct S IC; // expected-error {{field 'IC' has incomplete type}}
Chris Lattner1336cab2008-11-23 23:12:31 +000011 struct T { // expected-note {{previous definition is here}}
Chris Lattner271d4c22008-11-24 05:29:24 +000012 struct T {} X; // expected-error {{nested redefinition of 'T'}}
Fariborz Jahanianfa601d52007-10-04 00:22:33 +000013 }YYY;
Fariborz Jahanian023a4392007-09-14 16:27:55 +000014 FOO BADFUNC; // expected-error {{field 'BADFUNC' declared as a function}}
Douglas Gregordb568cf2009-01-08 20:45:30 +000015 int kaka; // expected-note {{previous declaration is here}}
Fariborz Jahanian023a4392007-09-14 16:27:55 +000016 int kaka; // expected-error {{duplicate member 'kaka'}}
17 char ch[]; // expected-error {{field 'ch' has incomplete type}}
18}
19@end