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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282949
91177308-0d34-0410-b5e6-
96231b3b80d8
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