[clang] [analyzer] Implemented the DanglingPtrDeref checker to detect use-after-scope lifetime errors (PR #206460)

Benedek Kaibas via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 10 06:49:51 PDT 2026


benedekaibas wrote:

> I triaged some bugs today and wanted to see if CSA would find those. Turns out, that it could with some improvements to this patch. So I've made this patch: [0001-analyzer-ReportDanglingPtrDeref-subobject-pointers-c.patch](https://github.com/user-attachments/files/29892084/0001-analyzer-ReportDanglingPtrDeref-subobject-pointers-c.patch) Apply it via `git am < 0001-*` - although, I think we should split it because it has basically 3 semantic changes.

Thank you, I will take a look at it. Also this checker is currently in pretty bad shape since it waits for #205951 being merged. My local version of the `DanglingPtrDeref` checker is different then what the PR contains. I will see what is the similarity between your patch and what I have locally. Thanks for investigating into this!

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


More information about the cfe-commits mailing list