Author: Haojian Wu Date: 2020-11-18T14:46:26+01:00 New Revision: aad3ea8983a84827f8d4bc81d76b2a5fe218430e
URL: https://github.com/llvm/llvm-project/commit/aad3ea8983a84827f8d4bc81d76b2a5fe218430e DIFF: https://github.com/llvm/llvm-project/commit/aad3ea8983a84827f8d4bc81d76b2a5fe218430e.diff LOG: [clangd] Remove the trailing "." in add-using message. to be consistent witih other code actions. Reviewed By: adamcz Differential Revision: https://reviews.llvm.org/D91694 Added: Modified: clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp clang-tools-extra/clangd/refactor/tweaks/RemoveUsingNamespace.cpp Removed: ################################################################################ diff --git a/clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp b/clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp index fe01894b6386..cf8347f312a3 100644 --- a/clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp +++ b/clang-tools-extra/clangd/refactor/tweaks/AddUsing.cpp @@ -52,7 +52,7 @@ REGISTER_TWEAK(AddUsing) 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. diff --git a/clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp b/clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp index 0462090ee25a..23b0e00d9aa5 100644 --- a/clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp +++ b/clang-tools-extra/clangd/refactor/tweaks/DefineOutline.cpp @@ -360,7 +360,7 @@ class DefineOutline : public Tweak { 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 { diff --git a/clang-tools-extra/clangd/refactor/tweaks/RemoveUsingNamespace.cpp b/clang-tools-extra/clangd/refactor/tweaks/RemoveUsingNamespace.cpp index 8bd9703397b6..25fab244e30c 100644 --- a/clang-tools-extra/clangd/refactor/tweaks/RemoveUsingNamespace.cpp +++ b/clang-tools-extra/clangd/refactor/tweaks/RemoveUsingNamespace.cpp @@ -38,7 +38,9 @@ class RemoveUsingNamespace : public Tweak { 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 @@ Expected<Tweak::Effect> RemoveUsingNamespace::apply(const Selection &Inputs) { 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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits