[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / CodeGen / blockwithlocalstatic.c
blob8b4210ed19018e270f38dcc0e95e086699bfebd3
1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fblocks -emit-llvm -o - %s | FileCheck %s
2 // pr8707
4 // CHECK: @block_block_invoke.test = internal global i32
5 int (^block)(void) = ^ {
6 static int test=0;
7 return test;
8 };
9 // CHECK: @block1_block_invoke_2.test = internal global i32
10 void (^block1)(void) = ^ {
11 static int test = 2;
12 return;
14 // CHECK: @block2_block_invoke_3.test = internal global i32
15 int (^block2)(void) = ^ {
16 static int test = 5;
17 return test;