2012-04-07 02:12:22 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
|
2009-03-01 08:56:52 +08:00
|
|
|
|
2013-12-13 13:58:51 +08:00
|
|
|
@interface MyClass
|
2009-03-01 08:56:52 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@protocol P
|
|
|
|
- (void)Pmeth;
|
2012-02-28 06:55:11 +08:00
|
|
|
- (void)Pmeth1; // expected-note {{method 'Pmeth1' declared here}}
|
2009-03-01 08:56:52 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
// Class extension
|
|
|
|
@interface MyClass () <P>
|
2013-03-27 08:02:21 +08:00
|
|
|
- (void)meth2; // expected-note {{method 'meth2' declared here}}
|
2009-03-01 08:56:52 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
// Add a category to test that clang does not emit warning for this method.
|
|
|
|
@interface MyClass (Category)
|
|
|
|
- (void)categoryMethod;
|
|
|
|
@end
|
|
|
|
|
2013-12-13 13:58:51 +08:00
|
|
|
@implementation MyClass // expected-warning {{method 'Pmeth1' in protocol 'P' not implemented}} \
|
2013-03-27 08:02:21 +08:00
|
|
|
// expected-warning {{method definition for 'meth2' not found}}
|
2009-03-01 08:56:52 +08:00
|
|
|
- (void)Pmeth {}
|
|
|
|
@end
|