Fariborz Jahanian | cd18762 | 2009-05-22 17:12:32 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -triple x86_64-apple-darwin10 -fsyntax-only -verify %s |
| 2 | // This program tests that if class implements the forwardInvocation method, then |
| 3 | // every method possible is implemented in the class and should not issue |
| 4 | // warning of the "Method definition not found" kind. */ |
| 5 | |
| 6 | @interface NSObject |
| 7 | @end |
| 8 | |
| 9 | @interface NSInvocation |
| 10 | @end |
| 11 | |
| 12 | @interface NSProxy |
| 13 | @end |
| 14 | |
| 15 | @protocol MyProtocol |
| 16 | -(void) doSomething; |
| 17 | @end |
| 18 | |
| 19 | @interface DestinationClass : NSObject<MyProtocol> |
| 20 | -(void) doSomething; |
| 21 | @end |
| 22 | |
| 23 | @implementation DestinationClass |
| 24 | -(void) doSomething |
| 25 | { |
| 26 | } |
| 27 | @end |
| 28 | |
| 29 | @interface MyProxy : NSProxy<MyProtocol> |
| 30 | { |
| 31 | DestinationClass *mTarget; |
| 32 | } |
| 33 | - (id) init; |
| 34 | - (void)forwardInvocation:(NSInvocation *)anInvocation; |
| 35 | @end |
| 36 | |
| 37 | @implementation MyProxy |
| 38 | - (void)forwardInvocation:(NSInvocation *)anInvocation |
| 39 | { |
| 40 | } |
Mike Stump | d1969d8 | 2009-07-22 00:43:08 +0000 | [diff] [blame] | 41 | - (id) init { return 0; } |
Fariborz Jahanian | cd18762 | 2009-05-22 17:12:32 +0000 | [diff] [blame] | 42 | @end |