xref: /minix3/external/bsd/llvm/dist/clang/test/Rewriter/rewrite-block-literal-1.mm (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// 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*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -Did="void *" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
3*f4a2713aSLionel Sambuc// radar 9254348
4*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp
5*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -Did="void *" -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp
6*f4a2713aSLionel Sambuc// rdar://11259664
7*f4a2713aSLionel Sambuc
8*f4a2713aSLionel Sambuc// rdar://11375908
9*f4a2713aSLionel Sambuctypedef unsigned long size_t;
10*f4a2713aSLionel Sambuc
11*f4a2713aSLionel Sambucvoid *sel_registerName(const char *);
12*f4a2713aSLionel Sambuctypedef void (^BLOCK_TYPE)(void);
13*f4a2713aSLionel Sambuc
14*f4a2713aSLionel Sambuc@interface CoreDAVTaskGroup
15*f4a2713aSLionel Sambuc{
16*f4a2713aSLionel Sambuc  int IVAR;
17*f4a2713aSLionel Sambuc}
18*f4a2713aSLionel Sambuc@property int IVAR;
19*f4a2713aSLionel Sambuc- (void) setCompletionBlock : (BLOCK_TYPE) arg;
20*f4a2713aSLionel Sambuc@end
21*f4a2713aSLionel Sambuc
22*f4a2713aSLionel Sambuc@implementation CoreDAVTaskGroup
23*f4a2713aSLionel Sambuc- (void)_finishInitialSync {
24*f4a2713aSLionel Sambuc                    CoreDAVTaskGroup *folderPost;
25*f4a2713aSLionel Sambuc  folderPost.completionBlock = ^{
26*f4a2713aSLionel Sambuc    self.IVAR = 0;
27*f4a2713aSLionel Sambuc    [self _finishInitialSync];
28*f4a2713aSLionel Sambuc  };
29*f4a2713aSLionel Sambuc
30*f4a2713aSLionel Sambuc  [folderPost setCompletionBlock : (^{
31*f4a2713aSLionel Sambuc    self.IVAR = 0;
32*f4a2713aSLionel Sambuc  })];
33*f4a2713aSLionel Sambuc}
34*f4a2713aSLionel Sambuc@dynamic IVAR;
35*f4a2713aSLionel Sambuc- (void) setCompletionBlock : (BLOCK_TYPE) arg {}
36*f4a2713aSLionel Sambuc@end
37*f4a2713aSLionel Sambuc
38*f4a2713aSLionel Sambuc
39