[clang] [LifetimeSafety] Add fix-it for misplaced lifetimebound attributes (PR #199149)

Utkarsh Saxena via cfe-commits cfe-commits at lists.llvm.org
Mon May 25 06:46:31 PDT 2026


usx95 wrote:

> > Not something that needs to be addressed in this PR, but another thing I’m a bit unsure about is whether we should move these warnings to `LifetimeSafetySuggestions` group now that they have fix-its. My concern is that this would also cause these warnings to show up in `warn-lifetime-safety-fixits.cpp` and `warn-lifetime-safety-suggestions.cpp`, which probably wouldn’t be ideal.
> 
> @usx95 What would you say about that?

​Suggestions is coupled a lot with inference/TU-analysis while this is surface-level placement policy ideally not even requiring the lifetime analysis. I would keep them separate and the latter simpler.

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


More information about the cfe-commits mailing list