blob: de038f5487b5f552e1a6d078c69fc6a033c40598 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Fariborz Jahanian4b6df3f2007-10-04 00:22:33 +00002
Douglas Gregor4ec339f2009-01-19 19:26:10 +00003struct S; // expected-note{{forward declaration of 'struct S'}}
Fariborz Jahaniane267ab62007-09-14 16:27:55 +00004typedef int FOO();
5
6@interface INTF
7{
8 struct F {} JJ;
Douglas Gregor4ec339f2009-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 Lattner5f4a6822008-11-23 23:12:31 +000011 struct T { // expected-note {{previous definition is here}}
Rafael Espindola01620702010-03-21 22:56:43 +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'}}
Douglas Gregor4ec339f2009-01-19 19:26:10 +000017 char ch[]; // expected-error {{field has incomplete type}}
Fariborz Jahaniane267ab62007-09-14 16:27:55 +000018}
19@end