xref: /minix3/external/bsd/llvm/dist/clang/test/SemaObjC/undef-protocol-methods-1.m (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
2*f4a2713aSLionel Sambuc
3*f4a2713aSLionel Sambuc@protocol P1
4*f4a2713aSLionel Sambuc- (void) P1proto;  // expected-note {{method 'P1proto' declared here}}
5*f4a2713aSLionel Sambuc+ (void) ClsP1Proto;    // expected-note {{method 'ClsP1Proto' declared here}}
6*f4a2713aSLionel Sambuc- (void) DefP1proto;
7*f4a2713aSLionel Sambuc@end
8*f4a2713aSLionel Sambuc@protocol P2
9*f4a2713aSLionel Sambuc- (void) P2proto;   // expected-note {{method 'P2proto' declared here}}
10*f4a2713aSLionel Sambuc+ (void) ClsP2Proto;  // expected-note {{method 'ClsP2Proto' declared here}}
11*f4a2713aSLionel Sambuc@end
12*f4a2713aSLionel Sambuc
13*f4a2713aSLionel Sambuc@protocol P3<P2>
14*f4a2713aSLionel Sambuc- (void) P3proto;   // expected-note {{method 'P3proto' declared here}}
15*f4a2713aSLionel Sambuc+ (void) ClsP3Proto;   // expected-note {{method 'ClsP3Proto' declared here}}
16*f4a2713aSLionel Sambuc+ (void) DefClsP3Proto;
17*f4a2713aSLionel Sambuc@end
18*f4a2713aSLionel Sambuc
19*f4a2713aSLionel Sambuc@protocol PROTO<P1, P3>
20*f4a2713aSLionel Sambuc- (void) meth;		  // expected-note {{method 'meth' declared here}}
21*f4a2713aSLionel Sambuc- (void) meth : (int) arg1;   // expected-note {{method 'meth:' declared here}}
22*f4a2713aSLionel Sambuc+ (void) cls_meth : (int) arg1;   // expected-note {{method 'cls_meth:' declared here}}
23*f4a2713aSLionel Sambuc@end
24*f4a2713aSLionel Sambuc
25*f4a2713aSLionel Sambuc@interface INTF <PROTO> // expected-note 3 {{required for direct or indirect protocol 'PROTO'}} \
26*f4a2713aSLionel Sambuc			// expected-note 2 {{required for direct or indirect protocol 'P1'}} \
27*f4a2713aSLionel Sambuc			// expected-note 2 {{required for direct or indirect protocol 'P3'}} \
28*f4a2713aSLionel Sambuc			// expected-note 2 {{required for direct or indirect protocol 'P2'}}
29*f4a2713aSLionel Sambuc@end
30*f4a2713aSLionel Sambuc
31*f4a2713aSLionel Sambuc@implementation INTF // expected-warning 9 {{in protocol not implemented}}
32*f4a2713aSLionel Sambuc- (void) DefP1proto{}
33*f4a2713aSLionel Sambuc+ (void) DefClsP3Proto{}
34*f4a2713aSLionel Sambuc@end
35