blob: 1833a0f457b2cd6445895a17a079cf7c73fd6889 [file] [log] [blame]
Fariborz Jahanian4b6df3f2007-10-04 00:22:33 +00001// RUN: clang -fsyntax-only -verify %s
2
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}}
Chris Lattner1829a6d2009-02-23 22:00:08 +000012 struct T {} X; // expected-error {{nested redefinition of 'T'}} \
13 expected-error {{field has incomplete type}}
Fariborz Jahanian4b6df3f2007-10-04 00:22:33 +000014 }YYY;
Fariborz Jahaniane267ab62007-09-14 16:27:55 +000015 FOO BADFUNC; // expected-error {{field 'BADFUNC' declared as a function}}
Douglas Gregor72de6672009-01-08 20:45:30 +000016 int kaka; // expected-note {{previous declaration is here}}
Fariborz Jahaniane267ab62007-09-14 16:27:55 +000017 int kaka; // expected-error {{duplicate member 'kaka'}}
Douglas Gregor4ec339f2009-01-19 19:26:10 +000018 char ch[]; // expected-error {{field has incomplete type}}
Fariborz Jahaniane267ab62007-09-14 16:27:55 +000019}
20@end