]> granicus.if.org Git - clang/commitdiff
Don't copy replacements in for-range loop. NFC.
authorBenjamin Kramer <benny.kra@googlemail.com>
Wed, 19 Oct 2016 13:50:17 +0000 (13:50 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Wed, 19 Oct 2016 13:50:17 +0000 (13:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284589 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Format/TokenAnalyzer.cpp

index d3122ca2eeb73dc9382269efebbe6f63508ee959..f2e4e8ef08197eaea5d7de8d20f76101b4aa996d 100644 (file)
@@ -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.