blob: 099a7a669a91f05d1f4262c545b6dbeb26f0e6cc [file] [log] [blame]
Daniel Dunbar8fbe78f2009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Fariborz Jahanianc9cd8a12007-10-04 00:22:33 +00002
Douglas Gregordd430f72009-01-19 19:26:10 +00003struct S; // expected-note{{forward declaration of 'struct S'}}
Fariborz Jahanianaefb2302007-09-14 16:27:55 +00004typedef int FOO();
5
6@interface INTF
7{
8 struct F {} JJ;
Douglas Gregordd430f72009-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 Lattner0369c572008-11-23 23:12:31 +000011 struct T { // expected-note {{previous definition is here}}
Eli Friedmand0e8de22009-12-07 00:22:08 +000012 struct T {} X; // expected-error {{nested redefinition of 'T'}} \
13 // expected-error {{field has incomplete type}}
Fariborz Jahanianc9cd8a12007-10-04 00:22:33 +000014 }YYY;
Fariborz Jahanianaefb2302007-09-14 16:27:55 +000015 FOO BADFUNC; // expected-error {{field 'BADFUNC' declared as a function}}
Douglas Gregor82ac25e2009-01-08 20:45:30 +000016 int kaka; // expected-note {{previous declaration is here}}
Fariborz Jahanianaefb2302007-09-14 16:27:55 +000017 int kaka; // expected-error {{duplicate member 'kaka'}}
Douglas Gregordd430f72009-01-19 19:26:10 +000018 char ch[]; // expected-error {{field has incomplete type}}
Fariborz Jahanianaefb2302007-09-14 16:27:55 +000019}
20@end