| 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 |
|
| 4 |
void *sel_registerName(const char *); |
| 5 |
|
| 6 |
@interface foo |
| 7 |
@end |
| 8 |
|
| 9 |
@interface foo2 : foo |
| 10 |
+ (id)x; |
| 11 |
@end |
| 12 |
|
| 13 |
typedef void (^b_t)(void); |
| 14 |
|
| 15 |
void bar(b_t block); |
| 16 |
|
| 17 |
void f() { |
| 18 |
static id foo = 0; |
| 19 |
bar(^{ |
| 20 |
foo = [foo2 x]; |
| 21 |
}); |
| 22 |
} |
| 23 |
|