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
6 typedef unsigned long size_t;
9 void *sel_registerName(const char *);
14 void foo(void (^block)(int));
17 static void enumerateIt(void (^block)(id, id, char *)) {
22 void apply(void (^block)(int));
24 static void x(int (^cmp)(int, int)) {
28 static void y(int (^cmp)(int, int)) {
34 void *_Block_copy(const void *aBlock);
35 void x(void (^block)(void)) {
36 block = ((__typeof(block))_Block_copy((const void *)(block)));
46 typedef void (^void_block_t)(void);
49 void_block_t __completion;
51 @property (copy) void_block_t f;
61 @protocol CoreDAVAccountInfoProvider;
62 @protocol CodeProvider;
63 typedef void (^BDVDiscoveryCompletionHandler)(int success, id<CoreDAVAccountInfoProvider> discoveredInfo);
64 typedef void (^BDVDiscoveryCompletion)(id<CodeProvider> codeInfo, int success, id<CoreDAVAccountInfoProvider> discoveredInfo);
65 typedef void (^BDVDiscovery)(int success);
66 typedef void (^BDVDisc)(id<CoreDAVAccountInfoProvider> discoveredInfo, id<CodeProvider> codeInfo,
67 int success, id<CoreDAVAccountInfoProvider, CodeProvider> Info);
68 typedef void (^BLOCK)(id, id<CoreDAVAccountInfoProvider>, id<CodeProvider> codeInfo);
69 typedef void (^EMPTY_BLOCK)();
70 typedef void (^ BDVDiscoveryCompletion1 )(id<CodeProvider> codeInfo, int success, id<CoreDAVAccountInfoProvider> discoveredInfo);
72 void (^BL)(void(^arg1)(), int i1, void(^arg)(int));
74 typedef void (^iscoveryCompletionHandler)(void(^arg1)(), id<CoreDAVAccountInfoProvider> discoveredInfo);
76 typedef void (^DVDisc)(id<CoreDAVAccountInfoProvider> discoveredInfo, id<CodeProvider> codeInfo,
77 void(^arg1)(), int i1, void(^arg)(id<CoreDAVAccountInfoProvider>),
78 int success, id<CoreDAVAccountInfoProvider, CodeProvider> Info);
83 void (^BLINT)(I<CoreDAVAccountInfoProvider>* ARG, INTF<CodeProvider, CoreDAVAccountInfoProvider>* ARG1);
86 BDVDiscoveryCompletionHandler ppp;
91 __attribute__((__blocks__(byref))) char (^addChangeToData)();
93 addChangeToData = ^() {
99 void test9204669_1() {
100 __attribute__((__blocks__(byref))) void (^addChangeToData)();
102 addChangeToData = ^() {