[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / CodeGen / static-order.c
blobdbd22db96b52c098ed3b466fc548cd740c395417
1 // RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s
2 // CHECK: ModuleID
3 // CHECK-NOT: zeroinitializer
4 // CHECK-LABEL: define {{.*}}ptr @f
6 struct s {
7 int a;
8 };
10 static void *v;
12 static struct s a;
14 static struct s a = {
18 void *f(void)
20 if (a.a)
21 return v;