[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
================
@@ -10730,6 +10730,7 @@ def warn_lifetime_safety_loan_expires_strict : Warning<
InGroup<LifetimeSafetyStrict>, DefaultIgnore;
def note_lifetime_safety_used_here : Note<"later used here">;
def note_lifetime_safety_destroyed_here : Note<"destroyed here">;
+def note_lifetime_safety_returned_here : Note<"returned here">;
----------------
usx95 wrote:
We can have a separate warning for this.
def warn_lifetime_safety_return_stack_addr_permissive: "reference to stack address maybe returned later".
def warn_lifetime_safety_return_stack_addr_strict: "reference to stack address is returned later".
https://github.com/llvm/llvm-project/pull/165370
More information about the cfe-commits
mailing list