[clang] [LifetimeSafety] Introduce intra-procedural analysis in Clang (PR #142313)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 10 22:34:27 PDT 2025
dyung wrote:
> I am part of a toolchain team at Google and we are seeing clang test failures in our toolchain builders from this PR.
>
> ```
> Exit Code: 1
>
> Command Output (stderr):
> --
> /b/s/w/ir/x/w/llvm_build/bin/clang -cc1 -internal-isystem /b/s/w/ir/x/w/llvm_build/lib/clang/21/include -nostdsysteminc -mllvm -debug-only=LifetimeFacts -Wexperimental-lifetime-safety /b/s/w/ir/x/w/llvm-llvm-project/clang/test/Sema/warn-lifetime-safety-dataflow.cpp 2>&1 | /b/s/w/ir/x/w/llvm_build/bin/FileCheck /b/s/w/ir/x/w/llvm-llvm-project/clang/test/Sema/warn-lifetime-safety-dataflow.cpp # RUN: at line 1
> + /b/s/w/ir/x/w/llvm_build/bin/clang -cc1 -internal-isystem /b/s/w/ir/x/w/llvm_build/lib/clang/21/include -nostdsysteminc -mllvm -debug-only=LifetimeFacts -Wexperimental-lifetime-safety /b/s/w/ir/x/w/llvm-llvm-project/clang/test/Sema/warn-lifetime-safety-dataflow.cpp
> + /b/s/w/ir/x/w/llvm_build/bin/FileCheck /b/s/w/ir/x/w/llvm-llvm-project/clang/test/Sema/warn-lifetime-safety-dataflow.cpp
> /b/s/w/ir/x/w/llvm-llvm-project/clang/test/Sema/warn-lifetime-safety-dataflow.cpp:9:17: error: CHECK-LABEL: expected string not found in input
> // CHECK-LABEL: Function: return_local_addr
> ^
> <stdin>:1:1: note: scanning from here
> clang (LLVM option parsing): Unknown command line argument '-debug-only=LifetimeFacts'. Try: 'clang (LLVM option parsing) --help'
> ^
> <stdin>:1:105: note: possible intended match here
> clang (LLVM option parsing): Unknown command line argument '-debug-only=LifetimeFacts'. Try: 'clang (LLVM option parsing) --help'
> ^
>
> Input file: <stdin>
> Check file: /b/s/w/ir/x/w/llvm-llvm-project/clang/test/Sema/warn-lifetime-safety-dataflow.cpp
>
> -dump-input=help explains the following input dump.
>
> Input was:
> <<<<<<
> 1: clang (LLVM option parsing): Unknown command line argument '-debug-only=LifetimeFacts'. Try: 'clang (LLVM option parsing) --help'
> label:9'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
> label:9'1 ? possible intended match
> 2: clang (LLVM option parsing): Did you mean '--debug-pass=LifetimeFacts'?
> label:9'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >>>>>>
>
> --
> ```
>
> I am taking a closer look. Here are the logs: https://logs.chromium.org/logs/fuchsia/buildbucket/cr-buildbucket/8709695680348159649/+/u/clang/tests/stdout
The test just needs asserts to run, I am preparing a patch to fix it and will submit it shortly.
https://github.com/llvm/llvm-project/pull/142313
More information about the cfe-commits
mailing list