[clang] [LifetimeSafety] Introduce intra-procedural analysis in Clang (PR #142313)

LLVM Continuous Integration via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 11 01:55:06 PDT 2025


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `clang-x64-windows-msvc` running on `windows-gcebot2` while building `clang` at step 4 "annotate".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/63/builds/7795

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/clang-windows.py ...' (failure)
...
[422/424] Running the Clang regression tests
llvm-lit.py: C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\utils\lit\lit\llvm\config.py:57: note: using lit tools: C:\Program Files\Git\usr\bin
llvm-lit.py: C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\utils\lit\lit\llvm\config.py:520: note: using clang: c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\clang.exe
llvm-lit.py: C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\utils\lit\lit\llvm\subst.py:126: note: Did not find cir-opt in C:\b\slave\clang-x64-windows-msvc\build\stage1\bin;C:\b\slave\clang-x64-windows-msvc\build\stage1\bin
llvm-lit.py: C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\utils\lit\lit\llvm\config.py:520: note: using ld.lld: c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\ld.lld.exe
llvm-lit.py: C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\utils\lit\lit\llvm\config.py:520: note: using lld-link: c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\lld-link.exe
llvm-lit.py: C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\utils\lit\lit\llvm\config.py:520: note: using ld64.lld: c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\ld64.lld.exe
llvm-lit.py: C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\utils\lit\lit\llvm\config.py:520: note: using wasm-ld: c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\wasm-ld.exe
-- Testing: 22410 tests, 32 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: Clang :: Sema/warn-lifetime-safety-dataflow.cpp (22410 of 22410)
******************** TEST 'Clang :: Sema/warn-lifetime-safety-dataflow.cpp' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\clang.exe -cc1 -internal-isystem C:\b\slave\clang-x64-windows-msvc\build\stage1\lib\clang\21\include -nostdsysteminc -mllvm -debug-only=LifetimeFacts -Wexperimental-lifetime-safety C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\Sema\warn-lifetime-safety-dataflow.cpp 2>&1 | c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\filecheck.exe C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\Sema\warn-lifetime-safety-dataflow.cpp
# executed command: 'c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\clang.exe' -cc1 -internal-isystem 'C:\b\slave\clang-x64-windows-msvc\build\stage1\lib\clang\21\include' -nostdsysteminc -mllvm -debug-only=LifetimeFacts -Wexperimental-lifetime-safety 'C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\Sema\warn-lifetime-safety-dataflow.cpp'
# note: command had no output on stdout or stderr
# error: command failed with exit status: 1
# executed command: 'c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\filecheck.exe' 'C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\Sema\warn-lifetime-safety-dataflow.cpp'
# .---command stderr------------
# | C:\b\slave\clang-x64-windows-msvc\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: C:\b\slave\clang-x64-windows-msvc\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     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

Step 8 (stage 1 check) failure: stage 1 check (failure)
...
[422/424] Running the Clang regression tests
llvm-lit.py: C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\utils\lit\lit\llvm\config.py:57: note: using lit tools: C:\Program Files\Git\usr\bin
llvm-lit.py: C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\utils\lit\lit\llvm\config.py:520: note: using clang: c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\clang.exe
llvm-lit.py: C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\utils\lit\lit\llvm\subst.py:126: note: Did not find cir-opt in C:\b\slave\clang-x64-windows-msvc\build\stage1\bin;C:\b\slave\clang-x64-windows-msvc\build\stage1\bin
llvm-lit.py: C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\utils\lit\lit\llvm\config.py:520: note: using ld.lld: c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\ld.lld.exe
llvm-lit.py: C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\utils\lit\lit\llvm\config.py:520: note: using lld-link: c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\lld-link.exe
llvm-lit.py: C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\utils\lit\lit\llvm\config.py:520: note: using ld64.lld: c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\ld64.lld.exe
llvm-lit.py: C:\b\slave\clang-x64-windows-msvc\llvm-project\llvm\utils\lit\lit\llvm\config.py:520: note: using wasm-ld: c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\wasm-ld.exe
-- Testing: 22410 tests, 32 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: Clang :: Sema/warn-lifetime-safety-dataflow.cpp (22410 of 22410)
******************** TEST 'Clang :: Sema/warn-lifetime-safety-dataflow.cpp' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\clang.exe -cc1 -internal-isystem C:\b\slave\clang-x64-windows-msvc\build\stage1\lib\clang\21\include -nostdsysteminc -mllvm -debug-only=LifetimeFacts -Wexperimental-lifetime-safety C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\Sema\warn-lifetime-safety-dataflow.cpp 2>&1 | c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\filecheck.exe C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\Sema\warn-lifetime-safety-dataflow.cpp
# executed command: 'c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\clang.exe' -cc1 -internal-isystem 'C:\b\slave\clang-x64-windows-msvc\build\stage1\lib\clang\21\include' -nostdsysteminc -mllvm -debug-only=LifetimeFacts -Wexperimental-lifetime-safety 'C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\Sema\warn-lifetime-safety-dataflow.cpp'
# note: command had no output on stdout or stderr
# error: command failed with exit status: 1
# executed command: 'c:\b\slave\clang-x64-windows-msvc\build\stage1\bin\filecheck.exe' 'C:\b\slave\clang-x64-windows-msvc\llvm-project\clang\test\Sema\warn-lifetime-safety-dataflow.cpp'
# .---command stderr------------
# | C:\b\slave\clang-x64-windows-msvc\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: C:\b\slave\clang-x64-windows-msvc\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     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1


```

</details>

https://github.com/llvm/llvm-project/pull/142313


More information about the cfe-commits mailing list