blob: 2c1023b0c706fb489ae593e64b7f57766608d4dd [file] [log] [blame]
John McCall260611a2012-06-20 06:18:46 +00001// 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
Fariborz Jahanianf23a0ff2011-08-02 20:28:46 +00002// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
Fariborz Jahanian43aa1c32012-04-16 22:14:01 +00003// 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
Fariborz Jahanianf23a0ff2011-08-02 20:28:46 +00005// rdar:// 9878420
6
Fariborz Jahanian8b08adb2012-05-03 21:44:12 +00007typedef unsigned long size_t;
8
Fariborz Jahanianf23a0ff2011-08-02 20:28:46 +00009void objc_enumerationMutation(id);
10void *sel_registerName(const char *);
11typedef 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