[clang] [LifetimeSafety] Warn on inapplicable `[[clang::lifetimebound]]` when return type can not carry a lifetime (PR #203767)
Gábor Horváth via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 15 05:24:40 PDT 2026
Xazax-hun wrote:
> I do not think we can extend the current check to return types. In fact, we need to be quite permissive for these. This is the reason why we have LifetimeAnnotatedOriginTypeCollector.
I wonder if it still makes sense to have an off by default warning for auditing. As in most users would never see this warning. That being said, the documentation probably should make it clear how we are usually relaxed about associating origins with certain types.
https://github.com/llvm/llvm-project/pull/203767
More information about the cfe-commits
mailing list