brintos

brintos / llvm-project-archived public Read only

0
0
Text · 510 B · 067cfd8 Raw
24 lines · plain
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.cpp2// RUN: %clang_cc1 -Wno-address-of-temporary -Did="void *" -D"SEL=void*" -D"__declspec(X)=" -emit-llvm -o %t %t-rw.cpp3 4void *sel_registerName(const char *);5 6@interface foo7@end8 9@interface foo2 : foo10+ (id)x;11@end12 13typedef void (^b_t)(void);14 15void bar(b_t block);16 17void f() {18        static id foo = 0;19        bar(^{20                foo = [foo2 x];21        });22}23 24