[clang] [LifetimeSafety] Detect use-after-return (PR #165370)

Kashika Akhouri via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 7 00:48:22 PST 2025


================
@@ -93,6 +93,9 @@ class FactsGenerator : public ConstStmtVisitor<FactsGenerator> {
   FactManager &FactMgr;
   AnalysisDeclContext &AC;
   llvm::SmallVector<Fact *> CurrentBlockFacts;
+  // Collect origins that escape the function in this block. These are handled
+  // at the end of the block to ensure `OEFs` appear after `Expire` facts.
+  llvm::SmallVector<Fact *> EscapesInCurrentBlock;
----------------
kashika0112 wrote:

Updated from the suggestion

https://github.com/llvm/llvm-project/pull/165370


More information about the cfe-commits mailing list