[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / CodeGen / stack-usage.c
blobc9f495605fefd92d35b189138721b74ba3d88fca
1 // REQUIRES: aarch64-registered-target
3 // RUN: rm -rf %t && split-file %s %t && cd %t
4 // RUN: %clang_cc1 -triple aarch64-unknown -I . -stack-usage-file a.su -emit-obj a.c -o a.o
5 // RUN: FileCheck %s < a.su
7 // CHECK: {{.*}}x.inc:1:bar [[#]] dynamic
8 // CHECK: a.c:2:foo [[#]] static
9 //--- a.c
10 #include "x.inc"
11 int foo() {
12 char a[8];
14 return 0;
17 //--- x.inc
18 int bar(int len) {
19 char a[len];
21 return 1;