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

Nicolas van Kempen via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 9 20:03:17 PDT 2025


================
@@ -0,0 +1,55 @@
+// RUN: %check_clang_tidy %s bugprone-loop-variable-copied-then-modified %t -- -- -I%S -std=c++!4 -config="{CheckOptions: {bugprone-loop-variable-copied-then-modified.IgnoreInexpensiveVariables: true}}"
+
+#include "Inputs/system-header-simulator/sim_set"
+#include "Inputs/system-header-simulator/sim_unordered_set"
+#include "Inputs/system-header-simulator/sim_map"
+#include "Inputs/system-header-simulator/sim_unordered_map"
+#include "Inputs/system-header-simulator/sim_vector"
+#include "Inputs/system-header-simulator/sim_algorithm"
----------------
nicovank wrote:

Looks like only `vector` is used below.

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


More information about the cfe-commits mailing list