1*f4a2713aSLionel Sambuc// 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*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"id=struct objc_object*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp 3*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp 4*f4a2713aSLionel Sambuc// 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*f4a2713aSLionel Sambuc// rdar:// 9878420 6*f4a2713aSLionel Sambuc 7*f4a2713aSLionel Sambuctypedef unsigned long size_t; 8*f4a2713aSLionel Sambuc 9*f4a2713aSLionel Sambucvoid objc_enumerationMutation(id); 10*f4a2713aSLionel Sambucvoid *sel_registerName(const char *); 11*f4a2713aSLionel Sambuctypedef void (^CoreDAVCompletionBlock)(void); 12*f4a2713aSLionel Sambuc 13*f4a2713aSLionel Sambuc@interface I 14*f4a2713aSLionel Sambuc- (void)M; 15*f4a2713aSLionel Sambuc- (id) ARR; 16*f4a2713aSLionel Sambuc@property (readwrite, copy, nonatomic) CoreDAVCompletionBlock c; 17*f4a2713aSLionel Sambuc@end 18*f4a2713aSLionel Sambuc 19*f4a2713aSLionel Sambuc@implementation I 20*f4a2713aSLionel Sambuc- (void)M { 21*f4a2713aSLionel Sambuc I* ace; 22*f4a2713aSLionel Sambuc self.c = ^() { 23*f4a2713aSLionel Sambuc // sanity test for the changes. 24*f4a2713aSLionel Sambuc [ace ARR]; 25*f4a2713aSLionel Sambuc for (I *privilege in [ace ARR]) { } 26*f4a2713aSLionel Sambuc }; 27*f4a2713aSLionel Sambuc self.c = ^() { 28*f4a2713aSLionel Sambuc // sanity test for the changes. 29*f4a2713aSLionel Sambuc [ace ARR]; 30*f4a2713aSLionel Sambuc }; 31*f4a2713aSLionel Sambuc} 32*f4a2713aSLionel Sambuc@end 33