================
@@ -187,7 +188,7 @@ class ErrorReporter {
       }
       reportFix(Diag, Error.Message.Fix);
     }
-    for (auto Fix : FixLocations) {
+    for (const auto Fix : FixLocations) {
----------------
bjope wrote:

I see this:
```
.../llvm/llvm-dev-cov/clang-tools-extra/clang-tidy/ClangTidy.cpp:191:21: error: 
loop variable 'Fix' creates a copy from type 'std::pair<clang::SourceLocation, 
bool> const' [-Werror,-Wrange-loop-construct]
    for (const auto Fix : FixLocations) {
                    ^
.../llvm/llvm-dev-cov/clang-tools-extra/clang-tidy/ClangTidy.cpp:191:10: note: 
use reference type 'std::pair<clang::SourceLocation, bool> const &' to prevent 
copying
    for (const auto Fix : FixLocations) {
         ^~~~~~~~~~~~~~~~
                    &
```

(Although I've only seen it when building with clang 15 as we seem to still use 
that in some of our old build bots....)

https://github.com/llvm/llvm-project/pull/213839
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to