[clang] [analyzer] Trigger checkLifetimeEnd callback from CFGLifetimeEnds element (PR #201123)

Arseniy Zaostrovnykh via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 1 00:37:48 PDT 2026


================
@@ -720,6 +720,9 @@ PathDiagnosticLocation::create(const ProgramPoint& P,
   } else if (std::optional<FunctionExitPoint> FE =
                  P.getAs<FunctionExitPoint>()) {
     return PathDiagnosticLocation(FE->getStmt(), SMng, FE->getStackFrame());
+  } else if (std::optional<LifetimeEnd> LE = P.getAs<LifetimeEnd>()) {
+    return PathDiagnosticLocation::createEnd(LE->getTriggerStmt(), SMng,
+                                             LE->getStackFrame());
----------------
necto wrote:

Hi @benedeaibas
I apologize for the delay in my replay. I'm happy you found a fix and will be happy to take a look at the PR.
>From the high-level I'm thinking if the bug-report visitor producing these notes should be refined to take into account liftime-end program points, but I didn't have time to explore this option.

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


More information about the cfe-commits mailing list