Просмотр исходного кода

Remove clangd Function.h include, fix Protocol.h location (#4787)

The Function.h include was simply unused, I was partly dropping the bits
that would've depended on it. Protocol.h is used, but it should really
be included from handle.h.
Jon Ross-Perkins 1 год назад
Родитель
Сommit
670de353c7

+ 1 - 1
toolchain/language_server/BUILD

@@ -25,7 +25,6 @@ cc_library(
     hdrs = ["context.h"],
     deps = [
         "//common:map",
-        "@llvm-project//clang-tools-extra/clangd:ClangDaemon",
     ],
 )
 
@@ -42,6 +41,7 @@ cc_library(
         "//toolchain/parse:node_kind",
         "//toolchain/parse:tree",
         "//toolchain/source:source_buffer",
+        "@llvm-project//clang-tools-extra/clangd:ClangDaemon",
     ],
 )
 

+ 2 - 2
toolchain/language_server/context.h

@@ -5,8 +5,8 @@
 #ifndef CARBON_TOOLCHAIN_LANGUAGE_SERVER_CONTEXT_H_
 #define CARBON_TOOLCHAIN_LANGUAGE_SERVER_CONTEXT_H_
 
-#include "clang-tools-extra/clangd/Protocol.h"
-#include "clang-tools-extra/clangd/support/Function.h"
+#include <string>
+
 #include "common/map.h"
 
 namespace Carbon::LanguageServer {

+ 1 - 0
toolchain/language_server/handle.h

@@ -5,6 +5,7 @@
 #ifndef CARBON_TOOLCHAIN_LANGUAGE_SERVER_HANDLE_H_
 #define CARBON_TOOLCHAIN_LANGUAGE_SERVER_HANDLE_H_
 
+#include "clang-tools-extra/clangd/Protocol.h"
 #include "toolchain/language_server/context.h"
 
 namespace Carbon::LanguageServer {