blob: 229eb8950080e7bba536e42f83021415052e75c5 [file] [log] [blame]
Fariborz Jahanian52b2e1e2010-02-12 17:52:31 +00001// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-rw.cpp
Fariborz Jahanian264e1592010-02-16 22:13:48 +00002// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
Fariborz Jahanian52b2e1e2010-02-12 17:52:31 +00003// radar 7638400
4
Fariborz Jahanian264e1592010-02-16 22:13:48 +00005typedef void * id;
6
Fariborz Jahanian52b2e1e2010-02-12 17:52:31 +00007@interface X
8@end
9
10void foo(void (^block)(int));
11
12@implementation X
13static void enumerateIt(void (^block)(id, id, char *)) {
14 foo(^(int idx) { });
15}
16@end
17
Fariborz Jahanian210c2482010-02-16 17:26:03 +000018// radar 7651312
19void apply(void (^block)(int));
20
21static void x(int (^cmp)(int, int)) {
22 x(cmp);
23}
24
25static void y(int (^cmp)(int, int)) {
26 apply(^(int sect) {
27 x(cmp);
28 });
29}