Fariborz Jahanian | 9e0393d | 2012-02-04 19:06:06 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp |
Fariborz Jahanian | f23a0ff | 2011-08-02 20:28:46 +0000 | [diff] [blame] | 2 | // RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp |
Fariborz Jahanian | 43aa1c3 | 2012-04-16 22:14:01 +0000 | [diff] [blame^] | 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=void*" -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp |
Fariborz Jahanian | f23a0ff | 2011-08-02 20:28:46 +0000 | [diff] [blame] | 5 | // rdar:// 9878420 |
| 6 | |
| 7 | void objc_enumerationMutation(id); |
| 8 | void *sel_registerName(const char *); |
| 9 | typedef 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 |