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 -Wno-address-of-temporary -Did="void *" -D"SEL=void*" -D"__declspec(X)=" -emit-llvm -o %t %t-rw.cpp |
3 | // radar 7946975 |
4 | |
5 | void *sel_registerName(const char *); |
6 | |
7 | @interface foo |
8 | @end |
9 | |
10 | @interface foo2 : foo |
11 | + (id)x; |
12 | @end |
13 | |
14 | typedef void (^b_t)(void); |
15 | |
16 | void bar(b_t block); |
17 | |
18 | void f() { |
19 | static id foo = 0; |
20 | bar(^{ |
21 | foo = [foo2 x]; |
22 | }); |
23 | } |
24 | |
25 | |