[clang] [LifetimeSafety] Improve destroyed and invalidated diagnostic notes (PR #204900)

via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 19 18:52:51 PDT 2026


================
@@ -11052,8 +11052,10 @@ def warn_lifetime_safety_inapplicable_lifetimebound
       DefaultIgnore;
 
 def note_lifetime_safety_used_here : Note<"later used here">;
-def note_lifetime_safety_invalidated_here : Note<"invalidated here">;
-def note_lifetime_safety_destroyed_here : Note<"destroyed here">;
+def note_lifetime_safety_invalidated_here : Note<"%0 is invalidated here">;
+def note_lifetime_safety_destroyed_here : Note<
+  "%0 is destroyed here at the end of "
+  "%select{its scope|the full-expression}1">;
----------------
NeKon69 wrote:

We can probably omit this part.

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


More information about the cfe-commits mailing list