[clang] [LifetimeSafety] Add warning for member functions returning field origins (PR #229784)

Utkarsh Saxena via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 9 07:55:38 PDT 2026


usx95 wrote:

Good point.

> Is the plan to manually distinguish between these cases? 
Most likely yes. We could inspect a sample of such instances.

Also, one other option to distinguish these is lifetimebound on `Vector::data`. If the pointer is owned, then it would have a `lifetimebound`; if not, we can mark it lifetimebound (again some manual filtering here).

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


More information about the cfe-commits mailing list