[clang] [LifetimeSafety] Improve destroyed and invalidated diagnostic notes (PR #204900)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Jun 21 22:27:11 PDT 2026
================
@@ -95,7 +95,8 @@ void conditional_operator_lifetimebound(int cond) {
int a, b;
p = identity(cond ? &a // expected-warning {{local variable 'a' does not live long enough}}
: &b); // expected-warning {{local variable 'b' does not live long enough}}
- } // expected-note 2 {{destroyed here}}
+ } // expected-note {{local variable 'a' is destroyed here}}
+ // expected-note at -1 {{local variable 'b' is destroyed here}}
----------------
iitianpushkar wrote:
OK!
https://github.com/llvm/llvm-project/pull/204900
More information about the cfe-commits
mailing list