John McCall | 260611a | 2012-06-20 06:18:46 +0000 | [diff] [blame] | 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.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 | |
Fariborz Jahanian | 8b08adb | 2012-05-03 21:44:12 +0000 | [diff] [blame] | 7 | typedef unsigned long size_t; |
| 8 | |
Fariborz Jahanian | f23a0ff | 2011-08-02 20:28:46 +0000 | [diff] [blame] | 9 | void objc_enumerationMutation(id); |
| 10 | void *sel_registerName(const char *); |
| 11 | typedef 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 |