1*0a6a1f1dSLionel Sambuc// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsyntax-only -verify -fblocks -Wno-objc-root-class %s 2*0a6a1f1dSLionel Sambuc// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -fsyntax-only -verify -fblocks -Wno-objc-root-class %s 3*0a6a1f1dSLionel Sambuc// expected-no-diagnostics 4*0a6a1f1dSLionel Sambuc 5*0a6a1f1dSLionel Sambuc// rdar://16808765 6*0a6a1f1dSLionel Sambuc 7*0a6a1f1dSLionel Sambuc@interface NSObject 8*0a6a1f1dSLionel Sambuc+ (void)clsMethod:(int*)arg; 9*0a6a1f1dSLionel Sambuc@end 10*0a6a1f1dSLionel Sambuc 11*0a6a1f1dSLionel Sambuc@class NSDictionary; 12*0a6a1f1dSLionel Sambuc@class NSError; 13*0a6a1f1dSLionel Sambuc 14*0a6a1f1dSLionel Sambuc@interface Foo : NSObject 15*0a6a1f1dSLionel Sambuc- (void)getDonuts:(void (^)(NSDictionary *, NSError *))replyBlock; 16*0a6a1f1dSLionel Sambuc- (void)getCake:(int*)arg, ...; 17*0a6a1f1dSLionel Sambuc@end 18*0a6a1f1dSLionel Sambuc 19*0a6a1f1dSLionel Sambuc@protocol Protocol 20*0a6a1f1dSLionel Sambuc@required 21*0a6a1f1dSLionel Sambuc- (void)getDonuts:(void (^)(NSDictionary *))replyBlock; 22*0a6a1f1dSLionel Sambuc- (void)getCake:(float*)arg, ...; 23*0a6a1f1dSLionel Sambuc+ (void)clsMethod:(float*)arg; 24*0a6a1f1dSLionel Sambuc@end 25*0a6a1f1dSLionel Sambuc 26*0a6a1f1dSLionel Sambuc@implementation Foo 27*0a6a1f1dSLionel Sambuc{ 28*0a6a1f1dSLionel Sambuc float g; 29*0a6a1f1dSLionel Sambuc} 30*0a6a1f1dSLionel Sambuc 31*0a6a1f1dSLionel Sambuc- (void)getDonuts:(void (^)(NSDictionary *, NSError *))replyBlock { 32*0a6a1f1dSLionel Sambuc [(id) 0 getDonuts:^(NSDictionary *replyDict) { }]; 33*0a6a1f1dSLionel Sambuc} 34*0a6a1f1dSLionel Sambuc 35*0a6a1f1dSLionel Sambuc- (void) getCake:(int*)arg, ... { 36*0a6a1f1dSLionel Sambuc [(id)0 getCake: &g, 1,3.14]; 37*0a6a1f1dSLionel Sambuc} 38*0a6a1f1dSLionel Sambuc@end 39*0a6a1f1dSLionel Sambuc 40*0a6a1f1dSLionel Sambucvoid func( Class c, float g ) { 41*0a6a1f1dSLionel Sambuc [c clsMethod: &g]; 42*0a6a1f1dSLionel Sambuc} 43*0a6a1f1dSLionel Sambuc 44*0a6a1f1dSLionel Sambuc// rdar://18095772 45*0a6a1f1dSLionel Sambuc@protocol NSKeyedArchiverDelegate @end 46*0a6a1f1dSLionel Sambuc 47*0a6a1f1dSLionel Sambuc@interface NSKeyedArchiver 48*0a6a1f1dSLionel Sambuc@property (assign) id <NSKeyedArchiverDelegate> delegate; 49*0a6a1f1dSLionel Sambuc@end 50*0a6a1f1dSLionel Sambuc 51*0a6a1f1dSLionel Sambuc@interface NSConnection 52*0a6a1f1dSLionel Sambuc@property (assign) id delegate; 53*0a6a1f1dSLionel Sambuc@end 54*0a6a1f1dSLionel Sambuc 55*0a6a1f1dSLionel Sambucextern id NSApp; 56*0a6a1f1dSLionel Sambuc 57*0a6a1f1dSLionel Sambuc@interface AppDelegate 58*0a6a1f1dSLionel Sambuc@end 59*0a6a1f1dSLionel Sambuc 60*0a6a1f1dSLionel SambucAppDelegate* GetDelegate() 61*0a6a1f1dSLionel Sambuc{ 62*0a6a1f1dSLionel Sambuc return [NSApp delegate]; 63*0a6a1f1dSLionel Sambuc} 64