[clang] [Lifetime Safety] Highlight lifetimebound calls in alias chain diagnostics (PR #206337)

via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 6 06:27:59 PDT 2026


================
@@ -1146,9 +1162,11 @@ void FactsGenerator::handleFunctionCall(const Expr *Call,
         // destination origin lists may have different lengths.
         // FIXME: Handle origin-shape mismatches gracefully so we can also flow
         // inner origins.
-        CurrentBlockFacts.push_back(FactMgr.createFact<OriginFlowFact>(
-            CallList->getOuterOriginID(), ArgList->getOuterOriginID(),
-            KillSrc));
+        auto *F = FactMgr.createFact<OriginFlowFact>(
+            CallList->getOuterOriginID(), ArgList->getOuterOriginID(), KillSrc);
+        if (std::optional<LifetimeBoundInfo> Info = GetLifetimeBoundInfo(I))
+          FactMgr.setLifetimeBoundInfo(F, *Info);
----------------
iitianpushkar wrote:

Ohh, Good catch. Will definitely do it.

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


More information about the cfe-commits mailing list