blob: b3d2c4833ed10671c0e8e4e1709c10f5b20d700e [file] [log] [blame]
John McCall260611a2012-06-20 06:18:46 +00001// 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
Fariborz Jahaniana5a79872010-05-24 18:32:56 +00002// 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
5void *sel_registerName(const char *);
6
7@interface foo
8@end
9
10@interface foo2 : foo
11+ (id)x;
12@end
13
14typedef void (^b_t)(void);
15
16void bar(b_t block);
17
18void f() {
19 static id foo = 0;
20 bar(^{
21 foo = [foo2 x];
22 });
23}
24