forked from OSchip/llvm-project
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:
parent
a675e0e03c
commit
6237a21d8c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue