[PATCH] D73218: [clangd] Show background index status using LSP 3.15 work-done progress notifications

Kadir Cetinkaya via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 23 01:26:16 PST 2020


kadircet added inline comments.


================
Comment at: clang-tools-extra/clangd/ClangdLSPServer.h:223
+    // We've requested the client to create a progress bar.
+    // Meanwhile, the state is buffered in PendingBackgraundIndexProgress.
+    Creating,
----------------
s/PendingBackgraundIndexProgress/PendingBackgroundIndexProgress/


================
Comment at: clang-tools-extra/clangd/ClangdLSPServer.h:232
+  /// LSP extension: skip WorkDoneProgressCreate, just send progress streams.
+  bool BackgroundIndexSkipCreate;
   // Store of the current versions of the open documents.
----------------
initialize to `false`


================
Comment at: clang-tools-extra/clangd/Protocol.cpp:383
+
+llvm::json::Value toJSON(const WorkDoneProgressBegin &P) {
+  llvm::json::Object Result{
----------------
why not  have a single struct with that has a required `kind` field and a bunch of optional fields.
Later on we can assert on the existence of fields depending on the kind, I think it would simplify the implementation.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73218





More information about the llvm-commits mailing list