[clang-tools-extra] Add WarnOnModificationOfCopiedLoopVariable to performance-for-range-c… (PR #155731)

Julia Hansbrough via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 28 14:20:45 PDT 2025


flowerhack wrote:

Implementing this as a separate check rather than attacking it to `performance-for-range-copy` sounds fine to me.

I'll go ahead and close this PR out.  I've created an issue at https://github.com/llvm/llvm-project/issues/155922 where I offer more evidence/rationale for why this can be counted as a bugprone pattern.

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


More information about the cfe-commits mailing list