[clang-tools-extra] Add bugprone-loop-variable-copied-then-modified clang-tidy check. (PR #157213)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 13 02:32:28 PDT 2025


================
@@ -0,0 +1,79 @@
+// RUN: %check_clang_tidy -std=c++17-or-later %s bugprone-loop-variable-copied-then-modified %t
----------------
vbvictor wrote:

```suggestion
// RUN: %check_clang_tidy %s bugprone-loop-variable-copied-then-modified %t
```
`c++11` is the default - I don't see why it needs `c++17`

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


More information about the cfe-commits mailing list