[clang] [LifetimeSafety] Track origins for lifetimebound calls returning record types (PR #187917)

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 26 03:18:55 PDT 2026


================
@@ -688,9 +707,9 @@ void FactsGenerator::handleFunctionCall(const Expr *Call,
         ArgList = getRValueOrigins(Args[I], ArgList);
       }
       if (isGslOwnerType(Args[I]->getType())) {
-        // GSL construction creates a view that borrows from arguments.
-        // This implies flowing origins through the list structure.
-        flow(CallList, ArgList, KillSrc);
+        CurrentBlockFacts.push_back(FactMgr.createFact<OriginFlowFact>(
----------------
Xazax-hun wrote:

Could you summarize the reason for this change? Maybe it is worth a comment why only the outer origins are being propagated here. 

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


More information about the cfe-commits mailing list