[PATCH] D69544: [clangd] NFC, reuse the source manager variable in the RawStringLiteral apply method
Alex Lorenz via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 28 18:31:59 PDT 2019
arphaman created this revision.
arphaman added a reviewer: ilya-biryukov.
Herald added subscribers: usaxena95, ributzka, kadircet, dexonsmith, jkorous, MaskRay.
Herald added a project: clang.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D69544
Files:
clang-tools-extra/clangd/refactor/tweaks/RawStringLiteral.cpp
Index: clang-tools-extra/clangd/refactor/tweaks/RawStringLiteral.cpp
===================================================================
--- clang-tools-extra/clangd/refactor/tweaks/RawStringLiteral.cpp
+++ clang-tools-extra/clangd/refactor/tweaks/RawStringLiteral.cpp
@@ -90,8 +90,7 @@
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));
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69544.226830.patch
Type: text/x-patch
Size: 787 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191029/85e9dbe7/attachment.bin>
More information about the cfe-commits
mailing list