[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
Fri Nov 8 14:52:35 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rGe1b07aac3d1c: [clangd] NFC, reuse the source manager variable in the RawStringLiteral apply… (authored by arphaman).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69544/new/

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.228524.patch
Type: text/x-patch
Size: 787 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191108/7f38a990/attachment.bin>


More information about the cfe-commits mailing list