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

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 12 09:36:15 PST 2021


kadircet accepted this revision.
kadircet added inline comments.
This revision is now accepted and ready to land.


================
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));
----------------
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


================
Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:173
+      elog("Notification {0} before initialization", Method);
+    } else if (Method == "$/cancelRequest") {
       log("unhandled notification {0}", Method);
----------------
you mean just `else` ?


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