[clang] [analyzer] Implement LifetimeModeling checker and refactor UseAfterLifetimeEnd (PR #205951)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 9 01:05:12 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 55707 tests passed
* 1375 tests skipped
* 1 test failed
## Failed Tests
(click on a test name to see its output)
### Clang
<details>
<summary>Clang.Analysis/lifetime-bound.cpp</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -analyze -setup-static-analyzer -analyzer-checker=core,alpha.cplusplus.UseAfterLifetimeEnd,debug.DebugLifetimeModeling -analyzer-config cfg-lifetime=true -verify C:\_work\llvm-project\llvm-project\clang\test\Analysis\lifetime-bound.cpp
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\23\include' -nostdsysteminc -analyze -setup-static-analyzer -analyzer-checker=core,alpha.cplusplus.UseAfterLifetimeEnd,debug.DebugLifetimeModeling -analyzer-config cfg-lifetime=true -verify 'C:\_work\llvm-project\llvm-project\clang\test\Analysis\lifetime-bound.cpp'
# .---command stderr------------
# | error: 'expected-warning' diagnostics expected but not seen:
# | File C:\_work\llvm-project\llvm-project\clang\test\Analysis\lifetime-bound.cpp Line 24: Origin &v bound to v
# | File C:\_work\llvm-project\llvm-project\clang\test\Analysis\lifetime-bound.cpp Line 37: Origin &y.a bound to y
# | File C:\_work\llvm-project\llvm-project\clang\test\Analysis\lifetime-bound.cpp Line 49: Origin &z.a bound to z
# | File C:\_work\llvm-project\llvm-project\clang\test\Analysis\lifetime-bound.cpp Line 58: Origin &num bound to num
# | File C:\_work\llvm-project\llvm-project\clang\test\Analysis\lifetime-bound.cpp Line 69: Origin &n bound to n
# | File C:\_work\llvm-project\llvm-project\clang\test\Analysis\lifetime-bound.cpp Line 80: Origin &odd bound to odd
# | File C:\_work\llvm-project\llvm-project\clang\test\Analysis\lifetime-bound.cpp Line 95: Origin &SymRegion{{.*}} bound to y
# | File C:\_work\llvm-project\llvm-project\clang\test\Analysis\lifetime-bound.cpp Line 105: Origin &SymRegion{{.*}} bound to f
# | File C:\_work\llvm-project\llvm-project\clang\test\Analysis\lifetime-bound.cpp Line 116: Origin &SymRegion{{.*}} bound to first_num, second_num
# | 9 errors generated.
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.
https://github.com/llvm/llvm-project/pull/205951
More information about the cfe-commits
mailing list