]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/Rewriter/rewrite-block-literal-1.mm
Fix-up EOL-styles changed by upstream.
[FreeBSD/FreeBSD.git] / test / Rewriter / rewrite-block-literal-1.mm
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
2 // RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -Did="void *" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
3 // radar 9254348
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
7
8 // rdar://11375908
9 typedef unsigned long size_t;
10
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;
25   folderPost.completionBlock = ^{
26     self.IVAR = 0;
27     [self _finishInitialSync];
28   };
29
30   [folderPost setCompletionBlock : (^{
31     self.IVAR = 0;
32   })];
33 }
34 @dynamic IVAR;
35 - (void) setCompletionBlock : (BLOCK_TYPE) arg {}
36 @end
37
38