xref: /minix3/external/bsd/llvm/dist/clang/test/SemaObjC/ivar-sem-check-1.m (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -verify %s
2*f4a2713aSLionel Sambuc
3*f4a2713aSLionel Sambucstruct S; // expected-note{{forward declaration of 'struct S'}}
4*f4a2713aSLionel Sambuctypedef int FOO();
5*f4a2713aSLionel Sambuc
6*f4a2713aSLionel Sambuc@interface INTF
7*f4a2713aSLionel Sambuc{
8*f4a2713aSLionel Sambuc	struct F {} JJ;
9*f4a2713aSLionel Sambuc	int arr[];  // expected-error {{field has incomplete type}}
10*f4a2713aSLionel Sambuc	struct S IC;  // expected-error {{field has incomplete type}}
11*f4a2713aSLionel Sambuc	struct T { // expected-note {{previous definition is here}}
12*f4a2713aSLionel Sambuc	  struct T {} X;  // expected-error {{nested redefinition of 'T'}}
13*f4a2713aSLionel Sambuc	}YYY;
14*f4a2713aSLionel Sambuc	FOO    BADFUNC;  // expected-error {{field 'BADFUNC' declared as a function}}
15*f4a2713aSLionel Sambuc	int kaka;	// expected-note {{previous declaration is here}}
16*f4a2713aSLionel Sambuc	int kaka;	// expected-error {{duplicate member 'kaka'}}
17*f4a2713aSLionel Sambuc	char ch[];	// expected-error {{field has incomplete type}}
18*f4a2713aSLionel Sambuc}
19*f4a2713aSLionel Sambuc@end
20