[clang] Adding use-after-return in Lifetime Analysis (PR #165370)

Utkarsh Saxena via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 30 12:28:26 PDT 2025


================
@@ -42,6 +42,11 @@ class LifetimeSafetyReporter {
   virtual void reportUseAfterFree(const Expr *IssueExpr, const Expr *UseExpr,
                                   SourceLocation FreeLoc,
                                   Confidence Confidence) {}
+
+  virtual void reportUseAfterReturn(const Expr *IssueExpr,
+                                    const Stmt *EscapeStmt,
----------------
usx95 wrote:

Does it have to be a `stmt` ?
I would be more specific here `const Expr *EscapedExpr,`

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


More information about the cfe-commits mailing list