blob: 4858faf2803171405a55a5c1455a8ab218435367 [file] [log] [blame]
Patrick Beardacfbe9e2012-04-06 18:12:22 +00001// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
Fariborz Jahanianc9cd8a12007-10-04 00:22:33 +00002
Fariborz Jahanianb75db4c2007-09-28 17:40:07 +00003@protocol P1
Ted Kremenek59b10db2012-02-27 22:55:11 +00004- (void) P1proto; // expected-note {{method 'P1proto' declared here}}
5+ (void) ClsP1Proto; // expected-note {{method 'ClsP1Proto' declared here}}
Fariborz Jahanianb75db4c2007-09-28 17:40:07 +00006- (void) DefP1proto;
7@end
8@protocol P2
Ted Kremenek59b10db2012-02-27 22:55:11 +00009- (void) P2proto; // expected-note {{method 'P2proto' declared here}}
10+ (void) ClsP2Proto; // expected-note {{method 'ClsP2Proto' declared here}}
Fariborz Jahanianb75db4c2007-09-28 17:40:07 +000011@end
12
13@protocol P3<P2>
Ted Kremenek59b10db2012-02-27 22:55:11 +000014- (void) P3proto; // expected-note {{method 'P3proto' declared here}}
15+ (void) ClsP3Proto; // expected-note {{method 'ClsP3Proto' declared here}}
Fariborz Jahanianb75db4c2007-09-28 17:40:07 +000016+ (void) DefClsP3Proto;
17@end
18
19@protocol PROTO<P1, P3>
Ted Kremenek59b10db2012-02-27 22:55:11 +000020- (void) meth; // expected-note {{method 'meth' declared here}}
21- (void) meth : (int) arg1; // expected-note {{method 'meth:' declared here}}
22+ (void) cls_meth : (int) arg1; // expected-note {{method 'cls_meth:' declared here}}
Fariborz Jahanianb75db4c2007-09-28 17:40:07 +000023@end
24
Ted Kremenek2ccf19e2013-12-13 05:58:51 +000025@interface INTF <PROTO>
Fariborz Jahanianb75db4c2007-09-28 17:40:07 +000026@end
27
Ted Kremenek2ccf19e2013-12-13 05:58:51 +000028@implementation INTF // expected-warning 9 {{in protocol '}}
Fariborz Jahanianb75db4c2007-09-28 17:40:07 +000029- (void) DefP1proto{}
Fariborz Jahanianb75db4c2007-09-28 17:40:07 +000030+ (void) DefClsP3Proto{}
Fariborz Jahanianc9cd8a12007-10-04 00:22:33 +000031@end