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 -fblocks -Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp 3 // RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp 4 // RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp 5 // radar 7692350 6 7 void f(void (^block)(void)); 8 9 @interface X { 10 int y; 11 } 12 - (void)foo; 13 @end 14 15 @implementation X 16 - (void)foo { 17 __block int kerfluffle; 18 // radar 7692183 19 __block x; 20 f(^{ 21 f(^{ 22 y = 42; 23 kerfluffle = 1; 24 x = 2; 25 }); 26 }); 27 } 28 @end 29