blob: 1ec4e57ce84efb7ca0d95a428ad37ffe503fe11d [file] [log] [blame]
Fariborz Jahanianfa601d52007-10-04 00:22:33 +00001// RUN: clang -fsyntax-only -verify %s
2
Douglas Gregor46fe06e2009-01-19 19:26:10 +00003struct S; // expected-note{{forward declaration of 'struct S'}}
Fariborz Jahanian023a4392007-09-14 16:27:55 +00004typedef int FOO();
5
6@interface INTF
7{
8 struct F {} JJ;
Douglas Gregor46fe06e2009-01-19 19:26:10 +00009 int arr[]; // expected-error {{field has incomplete type}}
10 struct S IC; // expected-error {{field 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'}}
Douglas Gregor46fe06e2009-01-19 19:26:10 +000017 char ch[]; // expected-error {{field has incomplete type}}
Fariborz Jahanian023a4392007-09-14 16:27:55 +000018}
19@end