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 | |
| 8 | void *sel_registerName(const char *); |
| 9 | typedef void (^BLOCK_TYPE)(void); |
| 10 | |
| 11 | @interface CoreDAVTaskGroup |
| 12 | { |
| 13 | int IVAR; |
| 14 | } |
| 15 | @property int IVAR; |
| 16 | - (void) setCompletionBlock : (BLOCK_TYPE) arg; |
| 17 | @end |
| 18 | |
| 19 | @implementation CoreDAVTaskGroup |
| 20 | - (void)_finishInitialSync { |
| 21 | CoreDAVTaskGroup *folderPost; |
Fariborz Jahanian | 1d01531 | 2011-04-11 21:17:02 +0000 | [diff] [blame] | 22 | folderPost.completionBlock = ^{ |
| 23 | self.IVAR = 0; |
| 24 | [self _finishInitialSync]; |
| 25 | }; |
| 26 | |
| 27 | [folderPost setCompletionBlock : (^{ |
| 28 | self.IVAR = 0; |
| 29 | })]; |
Fariborz Jahanian | 3617809 | 2011-04-08 23:48:29 +0000 | [diff] [blame] | 30 | } |
| 31 | @dynamic IVAR; |
| 32 | - (void) setCompletionBlock : (BLOCK_TYPE) arg {} |
| 33 | @end |
| 34 | |
| 35 | |