forked from OSchip/llvm-project
[clangd] NFC, reuse the source manager variable in the RawStringLiteral apply method
Differential Revision: https://reviews.llvm.org/D69544
This commit is contained in:
parent
8f089f2099
commit
e1b07aac3d
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue