brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · a395926 Raw
37 lines · plain
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.cpp2// RUN: %clang_cc1 -fsyntax-only -std=gnu++98 -Wno-address-of-temporary -Did="void *" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp3// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp4// RUN: %clang_cc1 -fsyntax-only -std=gnu++98 -Wno-address-of-temporary -Did="void *" -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp5 6 7typedef unsigned long size_t;8 9void *sel_registerName(const char *);10typedef void (^BLOCK_TYPE)(void);11 12@interface CoreDAVTaskGroup 13{14  int IVAR;15}16@property int IVAR;17- (void) setCompletionBlock : (BLOCK_TYPE) arg;18@end19 20@implementation CoreDAVTaskGroup21- (void)_finishInitialSync {22                    CoreDAVTaskGroup *folderPost;23  folderPost.completionBlock = ^{24    self.IVAR = 0;25    [self _finishInitialSync];26  };27 28  [folderPost setCompletionBlock : (^{29    self.IVAR = 0;30  })];31}32@dynamic IVAR;33- (void) setCompletionBlock : (BLOCK_TYPE) arg {}34@end35 36 37