[clang] [analyzer] Implement LifetimeModeling checker and refactor UseAfterLifetimeEnd (PR #205951)

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 30 03:45:03 PDT 2026


================
@@ -94,9 +45,10 @@ static bool hasDanglingSource(const MemRegion *Source, ProgramStateRef State,
 
 void UseAfterLifetimeEnd::checkReturnedBorrower(SVal Val, ProgramStateRef State,
                                                 CheckerContext &C) const {
-  if (auto *SourceSet = State->get<LifetimeBoundMap>(Val)) {
+  auto SourceSet = lifetimemodeling::getLifetimeSourceSet(State, Val);
----------------
Xazax-hun wrote:

I think the logic of this function might belong to the modeling checker.

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


More information about the cfe-commits mailing list