[clang-tools-extra] r309801 - [clangd] Run clang-format on all clangd sources. NFC.

Ilya Biryukov via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 2 02:08:39 PDT 2017


Author: ibiryukov
Date: Wed Aug  2 02:08:39 2017
New Revision: 309801

URL: http://llvm.org/viewvc/llvm-project?rev=309801&view=rev
Log:
[clangd] Run clang-format on all clangd sources. NFC.

Modified:
    clang-tools-extra/trunk/clangd/ClangdLSPServer.cpp
    clang-tools-extra/trunk/clangd/ClangdLSPServer.h
    clang-tools-extra/trunk/clangd/ClangdUnit.cpp
    clang-tools-extra/trunk/clangd/Protocol.cpp
    clang-tools-extra/trunk/clangd/ProtocolHandlers.cpp
    clang-tools-extra/trunk/clangd/ProtocolHandlers.h

Modified: clang-tools-extra/trunk/clangd/ClangdLSPServer.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/ClangdLSPServer.cpp?rev=309801&r1=309800&r2=309801&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/ClangdLSPServer.cpp (original)
+++ clang-tools-extra/trunk/clangd/ClangdLSPServer.cpp Wed Aug  2 02:08:39 2017
@@ -70,7 +70,7 @@ public:
   void onCompletion(TextDocumentPositionParams Params, StringRef ID,
                     JSONOutput &Out) override;
   void onGoToDefinition(TextDocumentPositionParams Params, StringRef ID,
-                            JSONOutput &Out) override;
+                        JSONOutput &Out) override;
 
 private:
   ClangdLSPServer &LangServer;
@@ -181,9 +181,11 @@ void ClangdLSPServer::LSPProtocolCallbac
 void ClangdLSPServer::LSPProtocolCallbacks::onCompletion(
     TextDocumentPositionParams Params, StringRef ID, JSONOutput &Out) {
 
-  auto Items = LangServer.Server.codeComplete(
-      Params.textDocument.uri.file,
-      Position{Params.position.line, Params.position.character}).Value;
+  auto Items = LangServer.Server
+                   .codeComplete(Params.textDocument.uri.file,
+                                 Position{Params.position.line,
+                                          Params.position.character})
+                   .Value;
 
   std::string Completions;
   for (const auto &Item : Items) {
@@ -200,9 +202,11 @@ void ClangdLSPServer::LSPProtocolCallbac
 void ClangdLSPServer::LSPProtocolCallbacks::onGoToDefinition(
     TextDocumentPositionParams Params, StringRef ID, JSONOutput &Out) {
 
-  auto Items = LangServer.Server.findDefinitions(
-      Params.textDocument.uri.file,
-      Position{Params.position.line, Params.position.character}).Value;
+  auto Items = LangServer.Server
+                   .findDefinitions(Params.textDocument.uri.file,
+                                    Position{Params.position.line,
+                                             Params.position.character})
+                   .Value;
 
   std::string Locations;
   for (const auto &Item : Items) {

Modified: clang-tools-extra/trunk/clangd/ClangdLSPServer.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/ClangdLSPServer.h?rev=309801&r1=309800&r2=309801&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/ClangdLSPServer.h (original)
+++ clang-tools-extra/trunk/clangd/ClangdLSPServer.h Wed Aug  2 02:08:39 2017
@@ -26,8 +26,8 @@ class JSONOutput;
 /// dispatch and ClangdServer together.
 class ClangdLSPServer {
 public:
- ClangdLSPServer(JSONOutput &Out, bool RunSynchronously,
-                 llvm::Optional<StringRef> ResourceDir);
+  ClangdLSPServer(JSONOutput &Out, bool RunSynchronously,
+                  llvm::Optional<StringRef> ResourceDir);
 
   /// Run LSP server loop, receiving input for it from \p In. \p In must be
   /// opened in binary mode. Output will be written using Out variable passed to

Modified: clang-tools-extra/trunk/clangd/ClangdUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/ClangdUnit.cpp?rev=309801&r1=309800&r2=309801&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/ClangdUnit.cpp (original)
+++ clang-tools-extra/trunk/clangd/ClangdUnit.cpp Wed Aug  2 02:08:39 2017
@@ -878,7 +878,8 @@ CppFile::deferRebuild(StringRef NewConte
         return Diagnostics; // Our rebuild request was cancelled, don't set
                             // ASTPromise.
 
-      That->ASTPromise.set_value(std::make_shared<ParsedASTWrapper>(std::move(NewAST)));
+      That->ASTPromise.set_value(
+          std::make_shared<ParsedASTWrapper>(std::move(NewAST)));
     } // unlock Mutex
 
     return Diagnostics;

Modified: clang-tools-extra/trunk/clangd/Protocol.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/Protocol.cpp?rev=309801&r1=309800&r2=309801&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/Protocol.cpp (original)
+++ clang-tools-extra/trunk/clangd/Protocol.cpp Wed Aug  2 02:08:39 2017
@@ -16,11 +16,10 @@
 #include "clang/Basic/LLVM.h"
 #include "llvm/ADT/SmallString.h"
 #include "llvm/Support/Format.h"
-#include "llvm/Support/raw_ostream.h"
 #include "llvm/Support/Path.h"
+#include "llvm/Support/raw_ostream.h"
 using namespace clang::clangd;
 
-
 URI URI::fromUri(llvm::StringRef uri) {
   URI Result;
   Result.uri = uri;
@@ -53,9 +52,7 @@ URI URI::parse(llvm::yaml::ScalarNode *P
   return URI::fromUri(Param->getValue(Storage));
 }
 
-std::string URI::unparse(const URI &U) {
-  return "\"" + U.uri + "\"";
-}
+std::string URI::unparse(const URI &U) { return "\"" + U.uri + "\""; }
 
 llvm::Optional<TextDocumentIdentifier>
 TextDocumentIdentifier::parse(llvm::yaml::MappingNode *Params) {

Modified: clang-tools-extra/trunk/clangd/ProtocolHandlers.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/ProtocolHandlers.cpp?rev=309801&r1=309800&r2=309801&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/ProtocolHandlers.cpp (original)
+++ clang-tools-extra/trunk/clangd/ProtocolHandlers.cpp Wed Aug  2 02:08:39 2017
@@ -237,6 +237,7 @@ void clangd::regiterCallbackHandlers(JSO
   Dispatcher.registerHandler(
       "textDocument/completion",
       llvm::make_unique<CompletionHandler>(Out, Callbacks));
-  Dispatcher.registerHandler("textDocument/definition",
+  Dispatcher.registerHandler(
+      "textDocument/definition",
       llvm::make_unique<GotoDefinitionHandler>(Out, Callbacks));
 }

Modified: clang-tools-extra/trunk/clangd/ProtocolHandlers.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/ProtocolHandlers.h?rev=309801&r1=309800&r2=309801&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/ProtocolHandlers.h (original)
+++ clang-tools-extra/trunk/clangd/ProtocolHandlers.h Wed Aug  2 02:08:39 2017
@@ -47,7 +47,7 @@ public:
   virtual void onCompletion(TextDocumentPositionParams Params, StringRef ID,
                             JSONOutput &Out) = 0;
   virtual void onGoToDefinition(TextDocumentPositionParams Params, StringRef ID,
-                            JSONOutput &Out) = 0;
+                                JSONOutput &Out) = 0;
 };
 
 void regiterCallbackHandlers(JSONRPCDispatcher &Dispatcher, JSONOutput &Out,




More information about the cfe-commits mailing list