[clangd] send diagnostic categories only when 'categorySupport'
authorAlex Lorenz <arphaman@gmail.com>
Wed, 22 Aug 2018 20:30:06 +0000 (20:30 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Wed, 22 Aug 2018 20:30:06 +0000 (20:30 +0000)
commit0ce8a7a039386e581eb4d7f9a5f8c34ee5fa36e2
treecfa1d4ebe1d24c3bb78b1ec364dca8a58b6c9f90
parentb238b8dcf01794b87e30e2c52af672f98b416cb6
[clangd] send diagnostic categories only when 'categorySupport'
capability was given by the client

After r339738 Clangd started sending categories with each diagnostic, but that
broke the eglot client. This commit puts the categories behind a capability to
fix that breakage.

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

llvm-svn: 340449
13 files changed:
clang-tools-extra/clangd/ClangdLSPServer.cpp
clang-tools-extra/clangd/Diagnostics.h
clang-tools-extra/clangd/Protocol.cpp
clang-tools-extra/clangd/Protocol.h
clang-tools-extra/test/clangd/compile-commands-path-in-initialize.test
clang-tools-extra/test/clangd/compile-commands-path.test
clang-tools-extra/test/clangd/diagnostic-category.test [new file with mode: 0644]
clang-tools-extra/test/clangd/diagnostics.test
clang-tools-extra/test/clangd/did-change-configuration-params.test
clang-tools-extra/test/clangd/execute-command.test
clang-tools-extra/test/clangd/extra-flags.test
clang-tools-extra/test/clangd/fixits-embed-in-diagnostic.test
clang-tools-extra/test/clangd/fixits.test