[clangd] extend the publishDiagnostics response to send back fixits to the
authorAlex Lorenz <arphaman@gmail.com>
Fri, 10 Aug 2018 17:25:07 +0000 (17:25 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Fri, 10 Aug 2018 17:25:07 +0000 (17:25 +0000)
commit8626d36f8c54ec8d1667e14cf3618edb183686ec
tree70bbb01301459c3cdf43c7174cd7054d4547f0a1
parent12a2911f621895358a3df435b1b25d231c0f6a14
[clangd] extend the publishDiagnostics response to send back fixits to the
client if the client supports this extension

This commit extends the 'textDocument/publishDiagnostics' notification sent from
Clangd to the client.  When it's enabled, Clangd sends out the fixits associated
with the appropriate diagnostic in the body of the 'publishDiagnostics'
notification. The client can enable this extension by setting 'clangdFixSupport'
to true in the textDocument capabilities during initialization.

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

llvm-svn: 339454
clang-tools-extra/clangd/ClangdLSPServer.cpp
clang-tools-extra/clangd/ClangdLSPServer.h
clang-tools-extra/clangd/Diagnostics.h
clang-tools-extra/clangd/Protocol.cpp
clang-tools-extra/clangd/Protocol.h