blob: a6d1a22a9157399f5a10b75f5065f130dcb7b333 [file] [log] [blame]
Fariborz Jahanian4b6df3f2007-10-04 00:22:33 +00001// RUN: clang -fsyntax-only -verify %s
2
Fariborz Jahaniane267ab62007-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 Lattner5f4a6822008-11-23 23:12:31 +000011 struct T { // expected-note {{previous definition is here}}
Chris Lattnerd9d22dd2008-11-24 05:29:24 +000012 struct T {} X; // expected-error {{nested redefinition of 'T'}}
Fariborz Jahanian4b6df3f2007-10-04 00:22:33 +000013 }YYY;
Fariborz Jahaniane267ab62007-09-14 16:27:55 +000014 FOO BADFUNC; // expected-error {{field 'BADFUNC' declared as a function}}
Douglas Gregor72de6672009-01-08 20:45:30 +000015 int kaka; // expected-note {{previous declaration is here}}
Fariborz Jahaniane267ab62007-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