blob: 174f70a4ee5c418c74b2cb16f4b14bbccd1e5bfa [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify %s
Andy Gibbs8e8fb3b2012-10-19 12:44:48 +00002// expected-no-diagnostics
Fariborz Jahaniancd187622009-05-22 17:12:32 +00003// 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 }
Mike Stumpd1969d82009-07-22 00:43:08 +000042 - (id) init { return 0; }
Fariborz Jahaniancd187622009-05-22 17:12:32 +000043@end