================
@@ -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);
----------------
NeKon69 wrote:
I think that instead of this we can have a local variable with
`LifetimeBoundInfo` for each param in the loop (or inside some condition), so
we can avoid this check here. (because right now this check happens 2 times,
inside `IsArgLifetimeBound` and here)
https://github.com/llvm/llvm-project/pull/206337
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits