]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/Rewriter/rewrite-unique-block-api.mm
Vendor import of clang release_38 branch r258549:
[FreeBSD/FreeBSD.git] / test / Rewriter / rewrite-unique-block-api.mm
1 // RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
2 // RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
3 // RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp
4 // RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp
5 // radar 7630551
6
7 typedef unsigned long size_t;
8 void f(void (^b)(char c));
9
10 @interface a
11 - (void)processStuff;
12 @end
13
14 @implementation a
15 - (void)processStuff {
16     f(^(char x) { });
17 }
18 @end
19
20 @interface b
21 - (void)processStuff;
22 @end
23
24 @implementation b
25 - (void)processStuff {
26     f(^(char x) { });
27 }
28 @end