[clang-tools-extra] r365885 - [clangd] Move the expandAuto tweak from global namespace into annoymous namespace.

Haojian Wu via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 12 02:38:53 PDT 2019


Author: hokein
Date: Fri Jul 12 02:38:53 2019
New Revision: 365885

URL: http://llvm.org/viewvc/llvm-project?rev=365885&view=rev
Log:
[clangd] Move the expandAuto tweak from global namespace into annoymous namespace.

Modified:
    clang-tools-extra/trunk/clangd/refactor/tweaks/ExpandAutoType.cpp
    clang-tools-extra/trunk/clangd/test/code-action-request.test

Modified: clang-tools-extra/trunk/clangd/refactor/tweaks/ExpandAutoType.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/refactor/tweaks/ExpandAutoType.cpp?rev=365885&r1=365884&r2=365885&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/refactor/tweaks/ExpandAutoType.cpp (original)
+++ clang-tools-extra/trunk/clangd/refactor/tweaks/ExpandAutoType.cpp Fri Jul 12 02:38:53 2019
@@ -24,6 +24,7 @@
 
 namespace clang {
 namespace clangd {
+namespace {
 
 /// Expand the "auto" type to the derived type
 /// Before:
@@ -53,7 +54,7 @@ private:
 
 REGISTER_TWEAK(ExpandAutoType)
 
-std::string ExpandAutoType::title() const { return "expand auto type"; }
+std::string ExpandAutoType::title() const { return "Expand auto type"; }
 
 bool ExpandAutoType::prepare(const Selection& Inputs) {
   CachedLocation = llvm::None;
@@ -115,5 +116,6 @@ llvm::Error ExpandAutoType::createErrorM
                                  ErrorMessage.c_str());
 }
 
+} // namespace
 } // namespace clangd
 } // namespace clang

Modified: clang-tools-extra/trunk/clangd/test/code-action-request.test
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/test/code-action-request.test?rev=365885&r1=365884&r2=365885&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/test/code-action-request.test (original)
+++ clang-tools-extra/trunk/clangd/test/code-action-request.test Fri Jul 12 02:38:53 2019
@@ -47,7 +47,7 @@
 # CHECK-NEXT:        }
 # CHECK-NEXT:      ],
 # CHECK-NEXT:      "command": "clangd.applyTweak",
-# CHECK-NEXT:      "title": "expand auto type"
+# CHECK-NEXT:      "title": "Expand auto type"
 # CHECK-NEXT:    }
 # CHECK-NEXT:  ]
 ---




More information about the cfe-commits mailing list