| 1 |
// RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 |
|
| 3 |
@interface MyClass1 |
| 4 |
@end |
| 5 |
|
| 6 |
@protocol P |
| 7 |
- (void) Pmeth; // expected-note {{method 'Pmeth' declared here}} |
| 8 |
- (void) Pmeth1; // expected-note {{method 'Pmeth1' declared here}} |
| 9 |
@end |
| 10 |
|
| 11 |
@interface MyClass1(CAT) <P> |
| 12 |
- (void) meth2; // expected-note {{method 'meth2' declared here}} |
| 13 |
@end |
| 14 |
|
| 15 |
@implementation MyClass1(CAT) // expected-warning {{method 'Pmeth' in protocol 'P' not implemented}} \ |
| 16 |
// expected-warning {{method definition for 'meth2' not found}} |
| 17 |
- (void) Pmeth1{} |
| 18 |
@end |
| 19 |
|
| 20 |
@interface MyClass1(DOG) <P> |
| 21 |
- (void)ppp; // expected-note {{method 'ppp' declared here}} |
| 22 |
@end |
| 23 |
|
| 24 |
@implementation MyClass1(DOG) // expected-warning {{method 'Pmeth1' in protocol 'P' not implemented}} \ |
| 25 |
// expected-warning {{method definition for 'ppp' not found}} |
| 26 |
- (void) Pmeth {} |
| 27 |
@end |
| 28 |
|
| 29 |
@implementation MyClass1(CAT1) |
| 30 |
@end |
| 31 |
|
| 32 |
@class NSString; |
| 33 |
|
| 34 |
@protocol NSObject |
| 35 |
- (NSString *)meth_inprotocol; |
| 36 |
@end |
| 37 |
|
| 38 |
@interface NSObject <NSObject> |
| 39 |
- (NSString *)description; |
| 40 |
+ (NSString *) cls_description; |
| 41 |
@end |
| 42 |
|
| 43 |
@protocol Foo |
| 44 |
- (NSString *)description; |
| 45 |
+ (NSString *) cls_description; |
| 46 |
@end |
| 47 |
|
| 48 |
@interface NSObject (FooConformance) <Foo> |
| 49 |
@end |
| 50 |
|
| 51 |
@implementation NSObject (FooConformance) |
| 52 |
@end |
| 53 |
|
| 54 |
// Don't warn when a category does not implemented a method imported |
| 55 |
// by its protocol because another category has its declaration and |
| 56 |
// that category will implement it. |
| 57 |
@interface NSOrderedSet @end |
| 58 |
|
| 59 |
@interface NSOrderedSet(CoolectionImplements) |
| 60 |
- (unsigned char)containsObject:(id)object; |
| 61 |
@end |
| 62 |
|
| 63 |
@protocol Collection |
| 64 |
- (unsigned char)containsObject:(id)object; |
| 65 |
@end |
| 66 |
|
| 67 |
@interface NSOrderedSet (CollectionConformance) <Collection> |
| 68 |
@end |
| 69 |
|
| 70 |
@implementation NSOrderedSet (CollectionConformance) |
| 71 |
@end |
| 72 |
|