llvm-project/clang-tools-extra/clangd
Haojian Wu 7934685c3d [clangd] Don't use the optional "severity" when comparing Diagnostic.
Summary:
We use Diagnostic as a key to find the corresponding FixIt when we do
the "apply-fix", but the "severity" field could be omitted, in some cases,
the codeAction request sent from LSP clients (e.g. VScode) doesn't include the
`severity` field, which makes clangd fail to find the FixIt.

Test the following code in VScode, before the fix, no FixIt shown.

```
void main() {}
^~~~
```

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: klimek, ilya-biryukov, cfe-commits

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

llvm-svn: 321106
2017-12-19 20:52:56 +00:00
..
clients/clangd-vscode [clangd] in VSCode client, filter extensions properly and only accept file: URIs 2017-12-18 11:29:45 +00:00
fuzzer [clangd] clang-format the code. NFC 2017-12-12 12:56:46 +00:00
index [clangd] Index-based code completion. 2017-12-19 16:50:37 +00:00
tool [clangd] Build dynamic index and use it for code completion. 2017-12-19 18:00:37 +00:00
CMakeLists.txt [clangd] Split findDefs/highlights into XRefs, from ClangdUnit. NFC 2017-12-19 17:06:07 +00:00
ClangdLSPServer.cpp [clangd] Build dynamic index and use it for code completion. 2017-12-19 18:00:37 +00:00
ClangdLSPServer.h [clangd] Don't use the optional "severity" when comparing Diagnostic. 2017-12-19 20:52:56 +00:00
ClangdServer.cpp [clangd] Build dynamic index and use it for code completion. 2017-12-19 18:00:37 +00:00
ClangdServer.h [clangd] Build dynamic index and use it for code completion. 2017-12-19 18:00:37 +00:00
ClangdUnit.cpp [clangd] Build dynamic index and use it for code completion. 2017-12-19 18:00:37 +00:00
ClangdUnit.h [clangd] Build dynamic index and use it for code completion. 2017-12-19 18:00:37 +00:00
ClangdUnitStore.cpp [clangd] Build dynamic index and use it for code completion. 2017-12-19 18:00:37 +00:00
ClangdUnitStore.h [clangd] Build dynamic index and use it for code completion. 2017-12-19 18:00:37 +00:00
CodeComplete.cpp [clangd] Supress a log warning by putting it behind a condition. 2017-12-19 18:10:32 +00:00
CodeComplete.h [clangd] Index-based code completion. 2017-12-19 16:50:37 +00:00
Compiler.cpp [clangd] Put all #includes in one block in clangd source files. NFC 2017-12-14 21:22:03 +00:00
Compiler.h [clangd] Put all #includes in one block in clangd source files. NFC 2017-12-14 21:22:03 +00:00
Context.cpp [clangd] Introduced a Context that stores implicit data 2017-12-12 11:16:45 +00:00
Context.h [clangd] Try to workaround MSVC compilation failure. 2017-12-13 13:43:47 +00:00
DraftStore.cpp Fixing compilation failures on buildbots. 2017-05-16 10:06:20 +00:00
DraftStore.h [clangd] Serialize onDiagnosticsReady callbacks for the same file. 2017-09-20 12:58:55 +00:00
Function.h [clangd] Fix bool conversion operator of UniqueFunction 2017-12-13 15:42:59 +00:00
FuzzyMatch.cpp [clangd] Fix FuzzyMatch tests on windows, NFC 2017-12-02 03:35:19 +00:00
FuzzyMatch.h [clangd] Avoid enum in bitfields, can't satisfy old GCC and new MSVC 2017-12-02 04:15:55 +00:00
GlobalCompilationDatabase.cpp [clangd] Implemented logging using Context 2017-12-13 12:51:22 +00:00
GlobalCompilationDatabase.h [clangd] Implemented logging using Context 2017-12-13 12:51:22 +00:00
JSONExpr.cpp [clangd] Put all #includes in one block in clangd source files. NFC 2017-12-14 21:22:03 +00:00
JSONExpr.h [clangd] Put all #includes in one block in clangd source files. NFC 2017-12-14 21:22:03 +00:00
JSONRPCDispatcher.cpp [clangd] Implemented tracing using Context 2017-12-14 15:04:59 +00:00
JSONRPCDispatcher.h [clangd] Implemented logging using Context 2017-12-13 12:51:22 +00:00
Logger.cpp [clangd] Implemented logging using Context 2017-12-13 12:51:22 +00:00
Logger.h [clangd] Implemented logging using Context 2017-12-13 12:51:22 +00:00
Path.h Restored r303067 and fixed failing test. 2017-05-16 09:38:59 +00:00
Protocol.cpp [clangd] Put all #includes in one block in clangd source files. NFC 2017-12-14 21:22:03 +00:00
Protocol.h [clangd] Don't use the optional "severity" when comparing Diagnostic. 2017-12-19 20:52:56 +00:00
ProtocolHandlers.cpp [clangd] Implemented logging using Context 2017-12-13 12:51:22 +00:00
ProtocolHandlers.h [clangd] Implemented logging using Context 2017-12-13 12:51:22 +00:00
SourceCode.cpp [clangd] Expose offset <-> LSP position functions, and fix bugs 2017-12-19 12:23:48 +00:00
SourceCode.h [clangd] Expose offset <-> LSP position functions, and fix bugs 2017-12-19 12:23:48 +00:00
Trace.cpp [clangd] Put all #includes in one block in clangd source files. NFC 2017-12-14 21:22:03 +00:00
Trace.h [clangd] Changed tracing interfaces 2017-12-14 15:33:38 +00:00
XRefs.cpp [clangd] Split findDefs/highlights into XRefs, from ClangdUnit. NFC 2017-12-19 17:06:07 +00:00
XRefs.h [clangd] Split findDefs/highlights into XRefs, from ClangdUnit. NFC 2017-12-19 17:06:07 +00:00