1// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp 2// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"SEL=void*" -D"id=void*" -D"__declspec(X)=" %t-rw.cpp 3// radar 7589414 4 5@protocol NSPortDelegate; 6@interface NSConnection @end 7 8@interface NSMessagePort 9- (void) clone; 10@end 11 12@implementation NSMessagePort 13- (void) clone { 14 NSConnection <NSPortDelegate> *conn = 0; 15 id <NSPortDelegate> *idc = 0; 16} 17@end 18 19// radar 7607413 20@protocol Proto1, Proto2; 21 22@protocol Proto 23@end 24 25unsigned char func(id<Proto1, Proto2> inProxy); 26 27id bar(id); 28 29void f() { 30 id a; 31 id b = bar((id <Proto>)a); 32} 33 34// rdar://8472487 35@protocol NSObject @end 36@class NSRunLoop; 37 38@protocol CoreDAVTaskManager <NSObject> 39 @property (retain) NSRunLoop *workRunLoop; 40@end 41 42 43// rdar://8475819 44@protocol some_protocol; 45 46void foo (int n) 47{ 48 id<some_protocol> array[n]; 49} 50 51