================
@@ -470,10 +470,28 @@ void FactsGenerator::VisitLambdaExpr(const LambdaExpr
*LE) {
}
}
+bool FactsGenerator::isEscapingOrigin(OriginID OID) const {
+ return llvm::any_of(EscapesInCurrentBlock, [OID](const Fact *F) {
+ if (const auto *EF = F->getAs<OriginEscapesFact>())
+ return EF->getEscapedOriginID() == OID;
+ return false;
+ });
+}
+
void FactsGenerator::handleLifetimeEnds(const CFGLifetimeEnds &LifetimeEnds) {
const VarDecl *LifetimeEndsVD = LifetimeEnds.getVarDecl();
if (!LifetimeEndsVD)
return;
+ // In loops, the back-edge can make a dead origin appear live at its
+ // pointee's ExpireFact. Expiring the origin prevents that.
----------------
aeft wrote:
Got it! updated.
https://github.com/llvm/llvm-project/pull/182368
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits