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