[PATCH] D96608: [clangd] Delay binding LSP methods until initialize. NFC

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 15 10:26:09 PST 2021


sammccall marked 2 inline comments as done.
sammccall added inline comments.


================
Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:165
       return false;
-    if (!Server.Server) {
-      elog("Notification {0} before initialization", Method);
-    } else if (Method == "$/cancelRequest") {
+    if (Method == "$/cancelRequest") {
       onCancel(std::move(Params));
----------------
kadircet wrote:
> this one is a functional change though , previously we would say `notification X before initialization` for cancellations that arrived before init, now we are going to say "bad cancellation request". not that it is bad, but it makes me wonder if it is intentional :D
Oops, yes - unintentional.
(now the structure of onNotify and onCall looks more similar, thanks!)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96608/new/

https://reviews.llvm.org/D96608



More information about the cfe-commits mailing list