[clang] [analyzer] Improve dangling value tracking in DanglingPtrDeref (PR #211818)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 24 08:18:34 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 55806 tests passed
* 1423 tests skipped
* 1 test failed
## Failed Tests
(click on a test name to see its output)
### Clang
<details>
<summary>Clang.Analysis/dangling-ptr-deref.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\24\include -nostdsysteminc -analyze -setup-static-analyzer -analyzer-checker=core,alpha.cplusplus.DanglingPtrDeref -analyzer-config cfg-lifetime=true -analyzer-output=text -verify C:\_work\llvm-project\llvm-project\clang\test\Analysis\dangling-ptr-deref.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\24\include' -nostdsysteminc -analyze -setup-static-analyzer -analyzer-checker=core,alpha.cplusplus.DanglingPtrDeref -analyzer-config cfg-lifetime=true -analyzer-output=text -verify 'C:\_work\llvm-project\llvm-project\clang\test\Analysis\dangling-ptr-deref.cpp'
# .---command stderr------------
# | error: 'expected-note' diagnostics seen but not expected:
# | File C:\_work\llvm-project\llvm-project\clang\test\Analysis\dangling-ptr-deref.cpp Line 91: 'num' initialized to 5
# | File C:\_work\llvm-project\llvm-project\clang\test\Analysis\dangling-ptr-deref.cpp Line 92: Value assigned to 'ptr'
# | File C:\_work\llvm-project\llvm-project\clang\test\Analysis\dangling-ptr-deref.cpp Line 107: 'num' initialized to 5
# | File C:\_work\llvm-project\llvm-project\clang\test\Analysis\dangling-ptr-deref.cpp Line 126: Initializing to 0
# | File C:\_work\llvm-project\llvm-project\clang\test\Analysis\dangling-ptr-deref.cpp Line 141: Value assigned to 'p'
# | File C:\_work\llvm-project\llvm-project\clang\test\Analysis\dangling-ptr-deref.cpp Line 161: 'local_arr' declared without an initial value
# | File C:\_work\llvm-project\llvm-project\clang\test\Analysis\dangling-ptr-deref.cpp Line 162: Value assigned to 'ptr'
# | File C:\_work\llvm-project\llvm-project\clang\test\Analysis\dangling-ptr-deref.cpp Line 173: Initializing to 0
# | File C:\_work\llvm-project\llvm-project\clang\test\Analysis\dangling-ptr-deref.cpp Line 185: 's.x' initialized to 0
# | File C:\_work\llvm-project\llvm-project\clang\test\Analysis\dangling-ptr-deref.cpp Line 197: field 'x' initialized to 0
# | File C:\_work\llvm-project\llvm-project\clang\test\Analysis\dangling-ptr-deref.cpp Line 209: 'o.inner.x' initialized to 0
# | 11 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/211818
More information about the cfe-commits
mailing list