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 -std=gnu++98 -Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
3 // RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp
4 // RUN: %clang_cc1 -fsyntax-only -std=gnu++98 -Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp
8 typedef unsigned long size_t;
11 void *sel_registerName(const char *);
16 void foo(void (^block)(int));
19 static void enumerateIt(void (^block)(id, id, char *)) {
25 void apply(void (^block)(int));
27 static void x(int (^cmp)(int, int)) {
31 static void y(int (^cmp)(int, int)) {
38 void *_Block_copy(const void *aBlock);
39 void x(void (^block)(void)) {
40 block = ((__typeof(block))_Block_copy((const void *)(block)));
51 typedef void (^void_block_t)(void);
54 void_block_t __completion;
56 @property (copy) void_block_t f;
67 @protocol CoreDAVAccountInfoProvider;
68 @protocol CodeProvider;
69 typedef void (^BDVDiscoveryCompletionHandler)(int success, id<CoreDAVAccountInfoProvider> discoveredInfo);
70 typedef void (^BDVDiscoveryCompletion)(id<CodeProvider> codeInfo, int success, id<CoreDAVAccountInfoProvider> discoveredInfo);
71 typedef void (^BDVDiscovery)(int success);
72 typedef void (^BDVDisc)(id<CoreDAVAccountInfoProvider> discoveredInfo, id<CodeProvider> codeInfo,
73 int success, id<CoreDAVAccountInfoProvider, CodeProvider> Info);
74 typedef void (^BLOCK)(id, id<CoreDAVAccountInfoProvider>, id<CodeProvider> codeInfo);
75 typedef void (^EMPTY_BLOCK)();
76 typedef void (^ BDVDiscoveryCompletion1 )(id<CodeProvider> codeInfo, int success, id<CoreDAVAccountInfoProvider> discoveredInfo);
78 void (^BL)(void(^arg1)(), int i1, void(^arg)(int));
80 typedef void (^iscoveryCompletionHandler)(void(^arg1)(), id<CoreDAVAccountInfoProvider> discoveredInfo);
82 typedef void (^DVDisc)(id<CoreDAVAccountInfoProvider> discoveredInfo, id<CodeProvider> codeInfo,
83 void(^arg1)(), int i1, void(^arg)(id<CoreDAVAccountInfoProvider>),
84 int success, id<CoreDAVAccountInfoProvider, CodeProvider> Info);
89 void (^BLINT)(I<CoreDAVAccountInfoProvider>* ARG, INTF<CodeProvider, CoreDAVAccountInfoProvider>* ARG1);
92 BDVDiscoveryCompletionHandler ppp;
97 __attribute__((__blocks__(byref))) char (^addChangeToData)();
99 addChangeToData = ^() {
105 void test9204669_1() {
106 __attribute__((__blocks__(byref))) void (^addChangeToData)();
108 addChangeToData = ^() {