32 lines · plain
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.cpp2// RUN: %clang_cc1 -fsyntax-only -std=gnu++98 -Wno-address-of-temporary -D"id=struct objc_object*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp3// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp4// RUN: %clang_cc1 -fsyntax-only -std=gnu++98 -Wno-address-of-temporary -D"id=struct objc_object*" -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp5 6typedef unsigned long size_t;7 8void objc_enumerationMutation(id);9void *sel_registerName(const char *);10typedef void (^CoreDAVCompletionBlock)(void);11 12@interface I13- (void)M;14- (id) ARR;15@property (readwrite, copy, nonatomic) CoreDAVCompletionBlock c;16@end17 18@implementation I19- (void)M {20 I* ace;21 self.c = ^() {22 // Basic correctness check for the changes.23 [ace ARR];24 for (I *privilege in [ace ARR]) { }25 };26 self.c = ^() {27 // Basic correctness test for the changes.28 [ace ARR];29 };30}31@end32