[clang] [LifetimeSafety] Add experimental_invalidates annotation (PR #186799)

Gábor Horváth via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 25 02:39:53 PDT 2026


Xazax-hun wrote:

Just recording some thoughts here from the last sync:
* Supporting code that relies on things like `vector::reserve` is unsolved but maybe it is not a big deal if we don't support that.
* Supporting nested containers is a problem.
* Supporting selective invalidation (invalidating references only vs references and iterators) is a challenge.
* Partial invalidation (only some fields are invalidated so only some methods are UB) are a challenge.

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


More information about the cfe-commits mailing list