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 | 3617809 | 2011-04-08 23:48:29 +0000 | [diff] [blame] | 2 | // RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -Did="void *" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp |
| 3 | // radar 9254348 |
Fariborz Jahanian | 0e97681 | 2012-04-16 23:00:57 +0000 | [diff] [blame] | 4 | // RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp |
| 5 | // RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -Did="void *" -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp |
| 6 | // rdar://11259664 |
Fariborz Jahanian | 3617809 | 2011-04-08 23:48:29 +0000 | [diff] [blame] | 7 | |
Fariborz Jahanian | 8b08adb | 2012-05-03 21:44:12 +0000 | [diff] [blame] | 8 | // rdar://11375908 |
| 9 | typedef unsigned long size_t; |
| 10 | |
Fariborz Jahanian | 3617809 | 2011-04-08 23:48:29 +0000 | [diff] [blame] | 11 | void *sel_registerName(const char *); |
| 12 | typedef void (^BLOCK_TYPE)(void); |
| 13 | |
| 14 | @interface CoreDAVTaskGroup |
| 15 | { |
| 16 | int IVAR; |
| 17 | } |
| 18 | @property int IVAR; |
| 19 | - (void) setCompletionBlock : (BLOCK_TYPE) arg; |
| 20 | @end |
| 21 | |
| 22 | @implementation CoreDAVTaskGroup |
| 23 | - (void)_finishInitialSync { |
| 24 | CoreDAVTaskGroup *folderPost; |
Fariborz Jahanian | 1d01531 | 2011-04-11 21:17:02 +0000 | [diff] [blame] | 25 | folderPost.completionBlock = ^{ |
| 26 | self.IVAR = 0; |
| 27 | [self _finishInitialSync]; |
| 28 | }; |
| 29 | |
| 30 | [folderPost setCompletionBlock : (^{ |
| 31 | self.IVAR = 0; |
| 32 | })]; |
Fariborz Jahanian | 3617809 | 2011-04-08 23:48:29 +0000 | [diff] [blame] | 33 | } |
| 34 | @dynamic IVAR; |
| 35 | - (void) setCompletionBlock : (BLOCK_TYPE) arg {} |
| 36 | @end |
| 37 | |
| 38 | |