[clangd] NFC, reuse the source manager variable in the RawStringLiteral apply method

Differential Revision: https://reviews.llvm.org/D69544
This commit is contained in:
Alex Lorenz 2019-11-08 14:50:26 -08:00
parent 8f089f2099
commit e1b07aac3d
1 changed files with 1 additions and 2 deletions

View File

@ -90,8 +90,7 @@ bool RawStringLiteral::prepare(const Selection &Inputs) {
Expected<Tweak::Effect> RawStringLiteral::apply(const Selection &Inputs) {
auto &SM = Inputs.AST.getSourceManager();
auto Reps = tooling::Replacements(
tooling::Replacement(Inputs.AST.getSourceManager(), Str,
("R\"(" + Str->getBytes() + ")\"").str(),
tooling::Replacement(SM, Str, ("R\"(" + Str->getBytes() + ")\"").str(),
Inputs.AST.getASTContext().getLangOpts()));
return Effect::mainFileEdit(SM, std::move(Reps));
}