2012-04-07 02:12:22 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
|
2007-10-04 08:22:33 +08:00
|
|
|
|
2007-09-29 01:40:07 +08:00
|
|
|
@protocol P1
|
2012-02-28 06:55:11 +08:00
|
|
|
- (void) P1proto; // expected-note {{method 'P1proto' declared here}}
|
|
|
|
+ (void) ClsP1Proto; // expected-note {{method 'ClsP1Proto' declared here}}
|
2007-09-29 01:40:07 +08:00
|
|
|
- (void) DefP1proto;
|
|
|
|
@end
|
|
|
|
@protocol P2
|
2012-02-28 06:55:11 +08:00
|
|
|
- (void) P2proto; // expected-note {{method 'P2proto' declared here}}
|
|
|
|
+ (void) ClsP2Proto; // expected-note {{method 'ClsP2Proto' declared here}}
|
2007-09-29 01:40:07 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@protocol P3<P2>
|
2012-02-28 06:55:11 +08:00
|
|
|
- (void) P3proto; // expected-note {{method 'P3proto' declared here}}
|
|
|
|
+ (void) ClsP3Proto; // expected-note {{method 'ClsP3Proto' declared here}}
|
2007-09-29 01:40:07 +08:00
|
|
|
+ (void) DefClsP3Proto;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@protocol PROTO<P1, P3>
|
2012-02-28 06:55:11 +08:00
|
|
|
- (void) meth; // expected-note {{method 'meth' declared here}}
|
|
|
|
- (void) meth : (int) arg1; // expected-note {{method 'meth:' declared here}}
|
|
|
|
+ (void) cls_meth : (int) arg1; // expected-note {{method 'cls_meth:' declared here}}
|
2007-09-29 01:40:07 +08:00
|
|
|
@end
|
|
|
|
|
2013-12-13 13:58:51 +08:00
|
|
|
@interface INTF <PROTO>
|
2007-09-29 01:40:07 +08:00
|
|
|
@end
|
|
|
|
|
2013-12-13 13:58:51 +08:00
|
|
|
@implementation INTF // expected-warning 9 {{in protocol '}}
|
2007-09-29 01:40:07 +08:00
|
|
|
- (void) DefP1proto{}
|
|
|
|
+ (void) DefClsP3Proto{}
|
2007-10-04 08:22:33 +08:00
|
|
|
@end
|