blob: 15ba1a1eb2f890976f8529ff9474f6475968c78a [file] [log] [blame]
Patrick Beardb2f68202012-04-06 18:12:22 +00001// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
Fariborz Jahanian4b6df3f2007-10-04 00:22:33 +00002
Fariborz Jahanian00ae8d52007-09-28 17:40:07 +00003@protocol P1
Ted Kremenek3306ec12012-02-27 22:55:11 +00004- (void) P1proto; // expected-note {{method 'P1proto' declared here}}
5+ (void) ClsP1Proto; // expected-note {{method 'ClsP1Proto' declared here}}
Fariborz Jahanian00ae8d52007-09-28 17:40:07 +00006- (void) DefP1proto;
7@end
8@protocol P2
Ted Kremenek3306ec12012-02-27 22:55:11 +00009- (void) P2proto; // expected-note {{method 'P2proto' declared here}}
10+ (void) ClsP2Proto; // expected-note {{method 'ClsP2Proto' declared here}}
Fariborz Jahanian00ae8d52007-09-28 17:40:07 +000011@end
12
13@protocol P3<P2>
Ted Kremenek3306ec12012-02-27 22:55:11 +000014- (void) P3proto; // expected-note {{method 'P3proto' declared here}}
15+ (void) ClsP3Proto; // expected-note {{method 'ClsP3Proto' declared here}}
Fariborz Jahanian00ae8d52007-09-28 17:40:07 +000016+ (void) DefClsP3Proto;
17@end
18
19@protocol PROTO<P1, P3>
Ted Kremenek3306ec12012-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 Jahanian00ae8d52007-09-28 17:40:07 +000023@end
24
Fariborz Jahanian8822f7c2010-03-27 19:02:17 +000025@interface INTF <PROTO> // expected-note 3 {{required for direct or indirect protocol 'PROTO'}} \
26 // expected-note 2 {{required for direct or indirect protocol 'P1'}} \
27 // expected-note 2 {{required for direct or indirect protocol 'P3'}} \
28 // expected-note 2 {{required for direct or indirect protocol 'P2'}}
Fariborz Jahanian00ae8d52007-09-28 17:40:07 +000029@end
30
Fariborz Jahanian61c8d3e2010-10-29 23:20:05 +000031@implementation INTF // expected-warning {{incomplete implementation}} \
Ted Kremenek3306ec12012-02-27 22:55:11 +000032 // expected-warning 9 {{in protocol not implemented}}
Fariborz Jahanian00ae8d52007-09-28 17:40:07 +000033- (void) DefP1proto{}
34
35+ (void) DefClsP3Proto{}
36
Fariborz Jahanian4b6df3f2007-10-04 00:22:33 +000037@end