61 lines · plain
1// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify -fblocks -Wno-objc-root-class %s2// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -fsyntax-only -verify -fblocks -Wno-objc-root-class %s3// expected-no-diagnostics4 5@interface NSObject 6+ (void)clsMethod:(int*)arg;7@end8 9@class NSDictionary;10@class NSError;11 12@interface Foo : NSObject13- (void)getDonuts:(void (^)(NSDictionary *, NSError *))replyBlock;14- (void)getCake:(int*)arg, ...;15@end16 17@protocol Protocol18@required19- (void)getDonuts:(void (^)(NSDictionary *))replyBlock;20- (void)getCake:(float*)arg, ...;21+ (void)clsMethod:(float*)arg;22@end23 24@implementation Foo25{26 float g;27}28 29- (void)getDonuts:(void (^)(NSDictionary *, NSError *))replyBlock {30 [(id) 0 getDonuts:^(NSDictionary *replyDict) { }];31}32 33- (void) getCake:(int*)arg, ... {34 [(id)0 getCake: &g, 1,3.14];35}36@end37 38void func( Class c, float g ) {39 [c clsMethod: &g];40}41 42@protocol NSKeyedArchiverDelegate @end43 44@interface NSKeyedArchiver45@property (assign) id <NSKeyedArchiverDelegate> delegate;46@end47 48@interface NSConnection49@property (assign) id delegate;50@end51 52extern id NSApp;53 54@interface AppDelegate55@end56 57AppDelegate* GetDelegate(void)58{59 return [NSApp delegate];60}61