[clang] [LifetimeSafety] Detect use-after-return (PR #165370)
Kashika Akhouri via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 6 00:48:03 PST 2025
================
@@ -166,7 +169,8 @@ void FactsGenerator::VisitReturnStmt(const ReturnStmt *RS) {
if (const Expr *RetExpr = RS->getRetValue()) {
if (hasOrigin(RetExpr)) {
OriginID OID = FactMgr.getOriginMgr().getOrCreate(*RetExpr);
- CurrentBlockFacts.push_back(FactMgr.createFact<ReturnOfOriginFact>(OID));
----------------
kashika0112 wrote:
Based on this discussion, I have removed `ReturnOfOriginFact` and added the new `OriginEscapesFact`.
https://github.com/llvm/llvm-project/pull/165370
More information about the cfe-commits
mailing list