[clang-tools-extra] 7812cb7 - Use reference type in for loop
Carlos Galvez via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 19 09:38:06 PDT 2021
Author: Carlos Galvez
Date: 2021-10-19T16:37:56Z
New Revision: 7812cb72a321c392a3b91b45b4780a0987818a36
URL: https://github.com/llvm/llvm-project/commit/7812cb72a321c392a3b91b45b4780a0987818a36
DIFF: https://github.com/llvm/llvm-project/commit/7812cb72a321c392a3b91b45b4780a0987818a36.diff
LOG: Use reference type in for loop
To fix failing build job.
Added:
Modified:
clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
index 35abda42d92d..2d3eb371b695 100644
--- a/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
+++ b/clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp
@@ -451,7 +451,7 @@ lineIsWithinNolintBegin(const ClangTidyContext &Context,
// The following blocks were never closed. Return diagnostics for each
// instance that can be displayed along with the original clang-tidy check
// that the user was attempting to suppress.
- for (const auto NolintBegin : NolintBegins) {
+ for (const auto &NolintBegin : NolintBegins) {
SuppressionErrors.emplace_back(
createNolintError(Context, SM, NolintBegin.first, true));
}
More information about the cfe-commits
mailing list