[clang] [LifetimeSafety] Warn on inapplicable `[[clang::lifetimebound]]` when return type can not carry a lifetime (PR #203767)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 15 05:23:49 PDT 2026
NeKon69 wrote:
> Currently this change will suggest lifetimebound on some constructors (with escaping fields) but adding that annotation would go against the current policy (see LifetimeBoundCtor test; SWithUserDefinedCopyLikeOps ctor is also correctly annotated).
So, something like what I did initially for #201101? I mean, I don't mind going with this approach, I just don't see why would we have separate "applicable" types for return types and parameter types.
https://github.com/llvm/llvm-project/pull/203767
More information about the cfe-commits
mailing list