[PATCH] D25049: Add missing std::move in Replacements::add

Alexander Shaposhnikov via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 30 14:14:48 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL282949: Add missing std::move in Replacements::add (authored by alexshap).

Changed prior to commit:
  https://reviews.llvm.org/D25049?vs=72902&id=73140#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D25049

Files:
  cfe/trunk/lib/Tooling/Core/Replacement.cpp


Index: cfe/trunk/lib/Tooling/Core/Replacement.cpp
===================================================================
--- cfe/trunk/lib/Tooling/Core/Replacement.cpp
+++ cfe/trunk/lib/Tooling/Core/Replacement.cpp
@@ -245,7 +245,7 @@
           R.getFilePath(), R.getOffset(), 0,
           (R.getReplacementText() + I->getReplacementText()).str());
       Replaces.erase(I);
-      Replaces.insert(NewR);
+      Replaces.insert(std::move(NewR));
       return llvm::Error::success();
     }
     // Insertion `R` is adjacent to a non-insertion replacement `I`, so they


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25049.73140.patch
Type: text/x-patch
Size: 568 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160930/0a4784cf/attachment.bin>


More information about the cfe-commits mailing list