r284589 - Don't copy replacements in for-range loop. NFC.
Benjamin Kramer via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 19 06:50:18 PDT 2016
Author: d0k
Date: Wed Oct 19 08:50:17 2016
New Revision: 284589
URL: http://llvm.org/viewvc/llvm-project?rev=284589&view=rev
Log:
Don't copy replacements in for-range loop. NFC.
Modified:
cfe/trunk/lib/Format/TokenAnalyzer.cpp
Modified: cfe/trunk/lib/Format/TokenAnalyzer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/TokenAnalyzer.cpp?rev=284589&r1=284588&r2=284589&view=diff
==============================================================================
--- cfe/trunk/lib/Format/TokenAnalyzer.cpp (original)
+++ cfe/trunk/lib/Format/TokenAnalyzer.cpp Wed Oct 19 08:50:17 2016
@@ -120,7 +120,7 @@ tooling::Replacements TokenAnalyzer::pro
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.
More information about the cfe-commits
mailing list