[clangd] Cleans up the semantic highlighting resources if clangd stops.
authorJohan Vikstrom <jvikstrom@google.com>
Wed, 28 Aug 2019 13:46:22 +0000 (13:46 +0000)
committerJohan Vikstrom <jvikstrom@google.com>
Wed, 28 Aug 2019 13:46:22 +0000 (13:46 +0000)
commit2dddf3e4ff813710d5ee529a8f5d077623f4a20e
treed5d02280802b0953cdbbced7346fa62ecf1fae56
parent2f323fc790c4a7fa23ef3a66d7c9147a8b9476e1
[clangd] Cleans up the semantic highlighting resources if clangd stops.

Summary: Disposes of the vscode listeners when clangd crashes and reuses the old highlighter when it restarts. The reason for reusing the highlighter is because this way the highlightings will not disappear as we won't have to dispose of them.

Reviewers: hokein, ilya-biryukov

Subscribers: MaskRay, jkorous, arphaman, kadircet, cfe-commits

Tags: #clang

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

llvm-svn: 370202
clang-tools-extra/clangd/clients/clangd-vscode/src/extension.ts
clang-tools-extra/clangd/clients/clangd-vscode/src/semantic-highlighting.ts
clang-tools-extra/clangd/clients/clangd-vscode/test/semantic-highlighting.test.ts