[llvm-branch-commits] [clang-tools-extra] 1edbbf9 - [clangd] Log warning when using legacy (theia) semantic highlighting.

Tom Stellard via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Jan 29 21:56:58 PST 2021


Author: Sam McCall
Date: 2021-01-29T21:56:27-08:00
New Revision: 1edbbf9d20d9f859f7ff2a146a501aeb1423141e

URL: https://github.com/llvm/llvm-project/commit/1edbbf9d20d9f859f7ff2a146a501aeb1423141e
DIFF: https://github.com/llvm/llvm-project/commit/1edbbf9d20d9f859f7ff2a146a501aeb1423141e.diff

LOG: [clangd] Log warning when using legacy (theia) semantic highlighting.

The legacy protocol will be removed on trunk after the 12 branch cut,
and gone in clangd 13.

Differential Revision: https://reviews.llvm.org/D95031

(cherry picked from commit 29472bb76915c4929aecc938300f6df31f63ac29)

Added: 
    

Modified: 
    clang-tools-extra/clangd/ClangdLSPServer.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clangd/ClangdLSPServer.cpp b/clang-tools-extra/clangd/ClangdLSPServer.cpp
index dc89ebd59fe2..35aed2166f03 100644
--- a/clang-tools-extra/clangd/ClangdLSPServer.cpp
+++ b/clang-tools-extra/clangd/ClangdLSPServer.cpp
@@ -510,6 +510,11 @@ void ClangdLSPServer::onInitialize(const InitializeParams &Params,
         "semanticTokens request, choosing the latter (no notifications).");
     Opts.TheiaSemanticHighlighting = false;
   }
+  if (Opts.TheiaSemanticHighlighting) {
+    log("Using legacy semanticHighlights notification, which will be removed "
+        "in clangd 13. Clients should use the standard semanticTokens "
+        "request instead.");
+  }
 
   if (Params.rootUri && *Params.rootUri)
     Opts.WorkspaceRoot = std::string(Params.rootUri->file());


        


More information about the llvm-branch-commits mailing list