From: Benjamin Kramer Date: Wed, 19 Oct 2016 13:50:17 +0000 (+0000) Subject: Don't copy replacements in for-range loop. NFC. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f1022e2f9c6967ad2cc21cd8f300791975523c07;p=clang 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 --- 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.