blob: fd34212d672e6a4314653f2f228340f7cc1ef5d4 [file] [log] [blame]
Fariborz Jahanian9e0393d2012-02-04 19:06:06 +00001// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %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
7void objc_enumerationMutation(id);
8void *sel_registerName(const char *);
9typedef 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