================
@@ -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>())
----------------
usx95 wrote:
I imagine we need this only for escape through return and not for other escapes
because only these would involve a lifetimeend.
In that case, we should more specific here and only check for `ReturnEscapeFact`
s/isEscapingOrigin/escapesViaReturn
https://github.com/llvm/llvm-project/pull/182368
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits