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

Julia Hansbrough via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 26 17:36:00 PDT 2025


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

C++17 has class template argument deduction, and I thought it'd be a useful test case to see if the FixIt does the correct thing in that case.  I can change that or put that case in a separate file, though, if you'd prefer?  Just let me know.

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


More information about the cfe-commits mailing list