1 // RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp 2 // RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp 3 // radar 7669784 4 5 typedef void * id; 6 void *sel_registerName(const char *); 7 8 @interface NSMutableString 9 - (NSMutableString *)string; 10 @end 11 12 @interface Z 13 @end 14 15 @implementation Z 16 17 - (void)x { 18 id numbers; 19 int i, numbersCount = 42; 20 __attribute__((__blocks__(byref))) int blockSum = 0; 21 void (^add)(id n, int idx, char *stop) = ^(id n, int idx, char *stop) { }; 22 [numbers enumerateObjectsUsingBlock:add]; 23 NSMutableString *forwardAppend = [NSMutableString string]; 24 __attribute__((__blocks__(byref))) NSMutableString *blockAppend = [NSMutableString string]; 25 } 26 27 @end 28 29