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"id=void*" -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"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp 5 // rdar:// 9878420 6 7 void objc_enumerationMutation(id); 8 void *sel_registerName(const char *); 9 typedef void (^CoreDAVCompletionBlock)(void); 10 11 @interface I 12 - (void)M; 13 - (id) ARR; 14 @property (readwrite, copy, nonatomic) CoreDAVCompletionBlock c; 15 @end 16 17 @implementation I 18 - (void)M { 19 I* ace; 20 self.c = ^() { 21 // sanity test for the changes. 22 [ace ARR]; 23 for (I *privilege in [ace ARR]) { } 24 }; 25 self.c = ^() { 26 // sanity test for the changes. 27 [ace ARR]; 28 }; 29 } 30 @end 31