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

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 14 02:30:51 PDT 2026


================
@@ -806,6 +806,11 @@ def UseAfterLifetimeEnd : Checker<"UseAfterLifetimeEnd">,
   Dependencies<[LifetimeModeling]>,
   Documentation<NotDocumented>;
 
+def ReportDanglingPtrDeref : Checker<"ReportDanglingPtrDeref">,
----------------
Xazax-hun wrote:

Actually, I think none of the lifetime related checkers should be part of the `cplusplus` package. These checks could catch errors in any other language mode including C or Objective-C. But we could move them out of these in a separate PR. 

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


More information about the cfe-commits mailing list