[clang] [LifetimeSafety] Infer [[clang::lifetimebound]] annotation (PR #171081)

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 8 03:19:28 PST 2025


https://github.com/Xazax-hun approved this pull request.

Overall, looks good to me once the review comments from @usx95 are addressed. I am just wondering if we should keep this behind a flag initially. The main motivation for that would be the understandability of these diagnostics. These are very useful, but it might be hard to follow what is going on without some additional diagnostics explaining what is happening between the function calls. 

Emitting some additional notes like "parameter N is inferred to be lifetimebound" for all the calls involved might make it easier to follow. 

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


More information about the cfe-commits mailing list