================
@@ -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>(
----------------
aeft wrote:

// The constructed gsl::Pointer borrows from the Owner's storage, not
// from what the Owner itself borrows, so only the outermost origin is
// needed.

Updated.

`return_dangling_view_through_owner` and `owner_outlives_lifetimebound_source` 
are related cases.

https://github.com/llvm/llvm-project/pull/187917
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to