[clang] [LifetimeSafety] Add support for iterator arithmetic (PR #195442)

Utkarsh Saxena via cfe-commits cfe-commits at lists.llvm.org
Sun May 3 10:59:26 PDT 2026


usx95 wrote:

I agree that this seems to be the only way to identify iterator types and this indeed looks ugly.  We already consider some special member functions like `begin()`, `operator*`for `gsl::Pointer`. Give that, I would be in favour of doing this for all `gsl::Pointer` types.

(Make sure to update the documentation of gsl::Pointer attribute to mention this).

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


More information about the cfe-commits mailing list