1 // RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-rw.cpp 2 // RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"Class=void*" -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp 3 4 @protocol P @end 5 @protocol P1 @end 6 @interface INTF 7 { 8 id CLASS_IVAR; 9 id<P, P1> Q_IVAR; 10 11 void (^_block)(id<P>); 12 void (*_fptr)(void (^_block)(id<P>)); 13 char CLASS_EXT_IVAR; 14 id<P, P1> (^ext_block)(id<P>, INTF<P,P1>*, INTF*); 15 id IMPL_IVAR; 16 double D_IMPL_IVAR; 17 INTF<P> *(*imp_fptr)(void (^_block)(id<P>, INTF<P,P1>*)); 18 id arr[100]; 19 } 20 @end 21 22 @implementation INTF @end 23 24 @interface MISC_INTF 25 { 26 id CLASS_IVAR; 27 id<P, P1> Q_IVAR; 28 29 void (^_block)(id<P>); 30 void (*_fptr)(void (^_block)(id<P>)); 31 unsigned int BF : 8; 32 } 33 @end 34 35 @interface MISC_INTF() 36 { 37 char CLASS_EXT_IVAR; 38 id<P, P1> (^ext_block)(id<P>, MISC_INTF<P,P1>*, MISC_INTF*); 39 } 40 @end 41 42 @interface MISC_INTF() { 43 int II1; 44 double DD1; } 45 @end 46 47 @interface MISC_INTF() { int II2; double DD2; } 48 @end 49 50 @interface MISC_INTF() { int II3; 51 double DD3; } 52 @end 53 54 @interface MISC_INTF() { int II4; double DD4; 55 } 56 @end 57 58 @implementation MISC_INTF 59 { 60 id IMPL_IVAR; 61 double D_IMPL_IVAR; 62 MISC_INTF<P> *(*imp_fptr)(void (^_block)(id<P>, MISC_INTF<P,P1>*)); 63 } 64 @end 65