================
@@ -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,
----------------
kashika0112 wrote:
Done. I've updated the signature to use `const Expr* EscapeExpr` as you
suggested.
I just wanted to confirm the effect on diagnostics: the warning now correctly
points to the variable being returned (e.g., on `local` in `return local;`)
instead of the general `return` keyword. This seems more precise, so I'm
assuming this was the intended and desirable outcome.
https://github.com/llvm/llvm-project/pull/165370
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits