From f1022e2f9c6967ad2cc21cd8f300791975523c07 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Wed, 19 Oct 2016 13:50:17 +0000 Subject: [PATCH] Don't copy replacements in for-range loop. NFC. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284589 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Format/TokenAnalyzer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Format/TokenAnalyzer.cpp b/lib/Format/TokenAnalyzer.cpp index d3122ca2ee..f2e4e8ef08 100644 --- a/lib/Format/TokenAnalyzer.cpp +++ b/lib/Format/TokenAnalyzer.cpp @@ -120,7 +120,7 @@ tooling::Replacements TokenAnalyzer::process() { for (unsigned i = 0, e = AnnotatedLines.size(); i != e; ++i) { delete AnnotatedLines[i]; } - for (auto R : RunResult) { + for (const auto &R : RunResult) { auto Err = Result.add(R); // FIXME: better error handling here. For now, simply return an empty // Replacements to indicate failure. -- 2.40.0