Add missing std::move in Replacements::add

This diff adds std::move to avoid copying of 
the Replacement NewR in the method Replacements::add.

Test plan: make -j8 check-all

Differential revision: https://reviews.llvm.org/D25049

llvm-svn: 282949
This commit is contained in:
Alexander Shaposhnikov 2016-09-30 21:05:45 +00:00
parent a675e0e03c
commit 6237a21d8c
1 changed files with 1 additions and 1 deletions

View File

@ -245,7 +245,7 @@ llvm::Error Replacements::add(const Replacement &R) {
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