[PATCH] D67165: [clangd][vscode] Make SemanticHighlightingFeature more self-contained.

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 4 07:46:26 PDT 2019


ilya-biryukov added inline comments.


================
Comment at: clang-tools-extra/clangd/clients/clangd-vscode/src/semantic-highlighting.ts:88
+    // recover from clangd crashes.
+    this.dispose();
+    // Register the handler to handle semantic highlighting notification.
----------------
Could we subscribe to `client.onDidChangeState` and `dispose()` whenever clangd crashes or stops?
This would ensure our `initialize` <-> `dispose` calls are properly paired and we will remove the highlightings even if clangd never restarts (I guess that could happen when we crash more than 5 times in a short timespan)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67165





More information about the cfe-commits mailing list