[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


================
@@ -55,6 +61,16 @@ std::vector<const MemRegion *> lifetime_modeling::getDanglingRegionsAfterReturn(
   return Regions;
 }
 
+bool lifetime_modeling::isDeallocated(ProgramStateRef State,
+                                      const MemRegion *Region) {
+  return State->contains<DeallocatedSourceSet>(Region);
+}
+
+bool lifetime_modeling::isBoundToLifetimeSourceSet(ProgramStateRef State,
----------------
Xazax-hun wrote:

This function is now dead, maybe it should be removed in this PR. 

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


More information about the cfe-commits mailing list