[PATCH] D91694: [clangd] Remove the trailing "." in add-using message.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 18 04:19:00 PST 2020
hokein updated this revision to Diff 306045.
hokein added a comment.
Fix other code actions as well.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91694/new/
https://reviews.llvm.org/D91694
Files:
clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp
clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp
clang-tools-extra/clangd/refactor/tweaks/RemoveUsingNamespace.cpp
Index: clang-tools-extra/clangd/refactor/tweaks/RemoveUsingNamespace.cpp
===================================================================
--- clang-tools-extra/clangd/refactor/tweaks/RemoveUsingNamespace.cpp
+++ clang-tools-extra/clangd/refactor/tweaks/RemoveUsingNamespace.cpp
@@ -38,7 +38,9 @@
bool prepare(const Selection &Inputs) override;
Expected<Effect> apply(const Selection &Inputs) override;
- std::string title() const override;
+ std::string title() const override {
+ return "Remove using namespace, re-qualify names instead";
+ }
llvm::StringLiteral kind() const override {
return CodeAction::REFACTOR_KIND;
}
@@ -200,10 +202,6 @@
return Effect::mainFileEdit(SM, std::move(R));
}
-std::string RemoveUsingNamespace::title() const {
- return std::string(
- llvm::formatv("Remove using namespace, re-qualify names instead."));
-}
} // namespace
} // namespace clangd
} // namespace clang
Index: clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp
===================================================================
--- clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp
+++ clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp
@@ -360,7 +360,7 @@
return CodeAction::REFACTOR_KIND;
}
std::string title() const override {
- return "Move function body to out-of-line.";
+ return "Move function body to out-of-line";
}
bool prepare(const Selection &Sel) override {
Index: clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp
===================================================================
--- clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp
+++ clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp
@@ -52,7 +52,7 @@
std::string AddUsing::title() const {
return std::string(llvm::formatv(
- "Add using-declaration for {0} and remove qualifier.", Name));
+ "Add using-declaration for {0} and remove qualifier", Name));
}
// Locates all "using" statements relevant to SelectionDeclContext.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91694.306045.patch
Type: text/x-patch
Size: 2015 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201118/0ad15b5d/attachment.bin>
More information about the cfe-commits
mailing list