[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGenCXX / reference-in-block-args.cpp
blob1ff1ae2dc85606806a4720ddd3840e17a05d006a
1 // RUN: %clang_cc1 -fblocks %s -emit-llvm -o %t
2 // rdar: // 8041962
4 extern "C" int printf(const char*, ...);
6 struct ST {
7 int filler;
8 int referrer;
9 };
11 void OUTER_BLOCK(void (^fixer)(ST& ref)) {
12 ST ref = {2, 100};
13 fixer(ref);
16 void INNER_BLOCK(int (^largeDo) ()) {
17 printf("%d\n", largeDo());
20 void scan() {
21 OUTER_BLOCK(^(ST &ref) {
22 INNER_BLOCK(^() { return ref.referrer + ref.filler; });
23 });
27 int main() {
28 scan();