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