[clang-tools-extra] e1b07aa - [clangd] NFC, reuse the source manager variable in the RawStringLiteral apply method
Alex Lorenz via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 8 14:51:02 PST 2019
Author: Alex Lorenz
Date: 2019-11-08T14:50:54-08:00
New Revision: e1b07aac3d1c92f58e05cb5c37c0707842da5839
URL: https://github.com/llvm/llvm-project/commit/e1b07aac3d1c92f58e05cb5c37c0707842da5839
DIFF: https://github.com/llvm/llvm-project/commit/e1b07aac3d1c92f58e05cb5c37c0707842da5839.diff
LOG: [clangd] NFC, reuse the source manager variable in the RawStringLiteral apply method
Differential Revision: https://reviews.llvm.org/D69544
Added:
Modified:
clang-tools-extra/clangd/refactor/tweaks/RawStringLiteral.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/refactor/tweaks/RawStringLiteral.cpp b/clang-tools-extra/clangd/refactor/tweaks/RawStringLiteral.cpp
index 17eed4b7962f..42d0122b3382 100644
--- a/clang-tools-extra/clangd/refactor/tweaks/RawStringLiteral.cpp
+++ b/clang-tools-extra/clangd/refactor/tweaks/RawStringLiteral.cpp
@@ -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));
}
More information about the cfe-commits
mailing list