[clang] [analyzer] Implemented the DanglingPtrDeref checker to detect use-after-scope lifetime errors (PR #209278)
DonĂ¡t Nagy via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 14 05:15:06 PDT 2026
================
@@ -806,6 +806,11 @@ def UseAfterLifetimeEnd : Checker<"UseAfterLifetimeEnd">,
Dependencies<[LifetimeModeling]>,
Documentation<NotDocumented>;
+def ReportDanglingPtrDeref : Checker<"ReportDanglingPtrDeref">,
----------------
NagyDonat wrote:
> Let's address this in a followup commit.
Renaming checkers is somewhat disruptive, even if it is just an alpha checker. I would prefer merging this with the right name if possible.
> I think `DanglingPtrDerefChecker` or just `DanglingPtrDeref` aligns better with the naming of existing checkers.
The suffix `Checker` is also redundant, even more so than `Report`. Unfortunately it it is used by a few checkers, but we shouldn't introduce new checkers that use it.
(By the way it is normal that the name of the _class that implements the checker_ is suffixed with `Checker`: e.g. `security.ArrayBound` is implemented in `class ArrayBoundChecker`.)
https://github.com/llvm/llvm-project/pull/209278
More information about the cfe-commits
mailing list