Fariborz Jahanian | f23a0ff | 2011-08-02 20:28:46 +0000 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-rw.cpp |
| 2 | // RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp |
| 3 | // rdar:// 9878420 |
| 4 | |
| 5 | void objc_enumerationMutation(id); |
| 6 | void *sel_registerName(const char *); |
| 7 | typedef void (^CoreDAVCompletionBlock)(void); |
| 8 | |
| 9 | @interface I |
| 10 | - (void)M; |
| 11 | - (id) ARR; |
| 12 | @property (readwrite, copy, nonatomic) CoreDAVCompletionBlock c; |
| 13 | @end |
| 14 | |
| 15 | @implementation I |
| 16 | - (void)M { |
| 17 | I* ace; |
| 18 | self.c = ^() { |
| 19 | // sanity test for the changes. |
| 20 | [ace ARR]; |
| 21 | for (I *privilege in [ace ARR]) { } |
| 22 | }; |
| 23 | self.c = ^() { |
| 24 | // sanity test for the changes. |
| 25 | [ace ARR]; |
| 26 | }; |
| 27 | } |
| 28 | @end |