blob: cbef3e5f4b5e3fc0cd1398a9c936dbc2e104a15e [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -fsyntax-only -verify %s
Fariborz Jahanian4b6df3f2007-10-04 00:22:33 +00002
Fariborz Jahanian00ae8d52007-09-28 17:40:07 +00003@protocol P1
Fariborz Jahanian52146832010-03-31 18:23:33 +00004- (void) P1proto; // expected-warning {{method in protocol not implemented [-Wprotocol]}}
5+ (void) ClsP1Proto; // expected-warning {{method in protocol not implemented [-Wprotocol]}}
Fariborz Jahanian00ae8d52007-09-28 17:40:07 +00006- (void) DefP1proto;
7@end
8@protocol P2
Fariborz Jahanian52146832010-03-31 18:23:33 +00009- (void) P2proto; // expected-warning {{method in protocol not implemented [-Wprotocol]}}
10+ (void) ClsP2Proto; // expected-warning {{method in protocol not implemented [-Wprotocol]}}
Fariborz Jahanian00ae8d52007-09-28 17:40:07 +000011@end
12
13@protocol P3<P2>
Fariborz Jahanian52146832010-03-31 18:23:33 +000014- (void) P3proto; // expected-warning {{method in protocol not implemented [-Wprotocol]}}
15+ (void) ClsP3Proto; // expected-warning {{method in protocol not implemented [-Wprotocol]}}
Fariborz Jahanian00ae8d52007-09-28 17:40:07 +000016+ (void) DefClsP3Proto;
17@end
18
19@protocol PROTO<P1, P3>
Fariborz Jahanian52146832010-03-31 18:23:33 +000020- (void) meth; // expected-warning {{method in protocol not implemented [-Wprotocol]}}
21- (void) meth : (int) arg1; // expected-warning {{method in protocol not implemented [-Wprotocol]}}
22+ (void) cls_meth : (int) arg1; // expected-warning {{method in protocol not implemented [-Wprotocol]}}
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 Jahanian8822f7c2010-03-27 19:02:17 +000031@implementation INTF // expected-warning {{incomplete implementation}}
Fariborz Jahanian00ae8d52007-09-28 17:40:07 +000032- (void) DefP1proto{}
33
34+ (void) DefClsP3Proto{}
35
Fariborz Jahanian4b6df3f2007-10-04 00:22:33 +000036@end