[llvm-branch-commits] [clang] [LifetimeSafety][NFC] Add field-labeled child edges to OriginNode and generalize subtree walks (PR #201510)
Gábor Horváth via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Jun 8 07:50:43 PDT 2026
================
@@ -365,13 +376,18 @@ void FactsGenerator::VisitUnaryOperator(const UnaryOperator *UO) {
}
}
+void FactsGenerator::emitReturnEscapes(OriginNode *N, const Expr *RetExpr) {
+ if (!N)
+ return;
+ EscapesInCurrentBlock.push_back(
+ FactMgr.createFact<ReturnEscapeFact>(N->getOriginID(), RetExpr));
+ for (const OriginNode::Edge &E : N->children())
----------------
Xazax-hun wrote:
I think instead of encoding the traversal here inline we should have a `forEachOrigin` or similar implemented on the tree that is efficient (not recursive using the stack), and pass in a closure here to emit the facts that we want.
https://github.com/llvm/llvm-project/pull/201510
More information about the llvm-branch-commits
mailing list