1// RUN: %clang_cc1 -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 -x objective-c++ -fblocks -o - %s
2
3extern "C" __declspec(dllexport) void BreakTheRewriter(void) {
4        __block int aBlockVariable = 0;
5        void (^aBlock)(void) = ^ {
6                aBlockVariable = 42;
7        };
8        aBlockVariable++;
9        void (^bBlocks)(void) = ^ {
10                aBlockVariable = 43;
11        };
12        void (^c)(void) = ^ {
13                aBlockVariable = 44;
14        };
15
16}
17__declspec(dllexport) extern "C" void AnotherBreakTheRewriter(int *p1, double d) {
18
19        __block int bBlockVariable = 0;
20        void (^aBlock)(void) = ^ {
21                bBlockVariable = 42;
22        };
23        bBlockVariable++;
24        void (^bBlocks)(void) = ^ {
25                bBlockVariable = 43;
26        };
27        void (^c)(void) = ^ {
28                bBlockVariable = 44;
29        };
30
31}
32