[clang] [Lifetime Safety] Distinguish attributed/inferred lifetimebound diagnostics (PR #220248)
Utkarsh Saxena via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 1 09:12:48 PDT 2026
================
@@ -2112,7 +2112,7 @@ void uaf_union() {
U u = U{"hello"};
U* up = &u; // expected-warning {{local variable 'u' does not live long enough}}
view = up->s; // expected-note {{local variable 'up' aliases the storage of local variable 'u'}} \
- // expected-note {{expression aliases the storage of local variable 'u' because the implicit object parameter is lifetimebound}}
+ // expected-note {{expression aliases the storage of local variable 'u' because the implicit object parameter is inferred as lifetimebound}}
----------------
usx95 wrote:
I think mentioning `lifetimebound` could be quite confusing as there is no function call. This is essentially field access and and not a lifetimebound call.
Definitely belongs to a separate PR.
https://github.com/llvm/llvm-project/pull/220248
More information about the cfe-commits
mailing list