xref: /minix3/external/bsd/llvm/dist/clang/test/SemaObjC/no-protocol-option-tests.m (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -Wno-protocol -verify -Wno-objc-root-class %s
2*f4a2713aSLionel Sambuc// rdar: // 7056600
3*f4a2713aSLionel Sambuc
4*f4a2713aSLionel Sambuc@protocol P
5*f4a2713aSLionel Sambuc- PMeth;
6*f4a2713aSLionel Sambuc@end
7*f4a2713aSLionel Sambuc
8*f4a2713aSLionel Sambuc// Test1
9*f4a2713aSLionel Sambuc@interface I  <P> @end
10*f4a2713aSLionel Sambuc@implementation I @end //  no warning with -Wno-protocol
11*f4a2713aSLionel Sambuc
12*f4a2713aSLionel Sambuc// Test2
13*f4a2713aSLionel Sambuc@interface C -PMeth; @end
14*f4a2713aSLionel Sambuc@interface C (Category) <P> @end
15*f4a2713aSLionel Sambuc@implementation C (Category) @end //  no warning with -Wno-protocol
16*f4a2713aSLionel Sambuc
17*f4a2713aSLionel Sambuc// Test2
18*f4a2713aSLionel Sambuc@interface super - PMeth; @end
19*f4a2713aSLionel Sambuc@interface J : super <P>
20*f4a2713aSLionel Sambuc- PMeth;	// expected-note {{method 'PMeth' declared here}}
21*f4a2713aSLionel Sambuc@end
22*f4a2713aSLionel Sambuc@implementation J @end // expected-warning {{method definition for 'PMeth' not found}}
23*f4a2713aSLionel Sambuc
24*f4a2713aSLionel Sambuc// Test3
25*f4a2713aSLionel Sambuc@interface K : super <P>
26*f4a2713aSLionel Sambuc@end
27*f4a2713aSLionel Sambuc@implementation K @end // no warning with -Wno-protocol
28*f4a2713aSLionel Sambuc
29*f4a2713aSLionel Sambuc// Test4
30*f4a2713aSLionel Sambuc@interface Root @end
31*f4a2713aSLionel Sambuc@interface L : Root<P> @end
32*f4a2713aSLionel Sambuc@implementation L @end // no warning with -Wno-protocol
33