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