blob: 88ad5742effa1e49221194d86bb24ad18c70c9f9 [file] [log] [blame]
John McCall260611a2012-06-20 06:18:46 +00001// 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 Jahanian36178092011-04-08 23:48:29 +00002// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -Did="void *" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
3// radar 9254348
Fariborz Jahanian0e976812012-04-16 23:00:57 +00004// 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 Jahanian36178092011-04-08 23:48:29 +00007
Fariborz Jahanian8b08adb2012-05-03 21:44:12 +00008// rdar://11375908
9typedef unsigned long size_t;
10
Fariborz Jahanian36178092011-04-08 23:48:29 +000011void *sel_registerName(const char *);
12typedef 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 Jahanian1d015312011-04-11 21:17:02 +000025 folderPost.completionBlock = ^{
26 self.IVAR = 0;
27 [self _finishInitialSync];
28 };
29
30 [folderPost setCompletionBlock : (^{
31 self.IVAR = 0;
32 })];
Fariborz Jahanian36178092011-04-08 23:48:29 +000033}
34@dynamic IVAR;
35- (void) setCompletionBlock : (BLOCK_TYPE) arg {}
36@end
37
38