xref: /llvm-project/clang/test/Rewriter/rewrite-unique-block-api.mm (revision 0f1c1be1968076d6f96f8a7bcc4a15cf195ecd97)
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
6typedef unsigned long size_t;
7void f(void (^b)(char c));
8
9@interface a
10- (void)processStuff;
11@end
12
13@implementation a
14- (void)processStuff {
15    f(^(char x) { });
16}
17@end
18
19@interface b
20- (void)processStuff;
21@end
22
23@implementation b
24- (void)processStuff {
25    f(^(char x) { });
26}
27@end
28