llvm-project/clang-tools-extra/test/clangd
Sam McCall 8111d3b89c [clangd] Emit ranges for clangd diagnostics, and fix off-by-one positions
Summary:
 - when the diagnostic has an explicit range, we prefer that
 - if the diagnostic has a fixit, its RemoveRange is our next choice
 - otherwise we try to expand the diagnostic location into a whole token.
   (inspired by VSCode, which does this client-side when given an empty range)
 - if all else fails, we return the zero-width range as now.
   (clients react in different ways to this, highlighting a token or a char)
 - this includes the off-by-one fix from D40860, and borrows heavily from it

Reviewers: rwols, hokein

Subscribers: klimek, ilya-biryukov, cfe-commits

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

llvm-svn: 320555
2017-12-13 08:48:42 +00:00
..
authority-less-uri.test [clangd] Switch from YAMLParser to JSONExpr 2017-11-28 09:37:43 +00:00
completion.test [clangd] Make completion scores use 0-1 floats internally. 2017-11-23 17:09:04 +00:00
definitions.test [clangd] Switch from YAMLParser to JSONExpr 2017-11-28 09:37:43 +00:00
diagnostics-preamble.test [clangd] Use in-memory preambles in clangd. 2017-11-16 16:25:18 +00:00
diagnostics.test [clangd] Emit ranges for clangd diagnostics, and fix off-by-one positions 2017-12-13 08:48:42 +00:00
documenthighlight.test [clangd] Document highlights for clangd 2017-12-12 12:27:47 +00:00
execute-command.test [clangd] Emit ranges for clangd diagnostics, and fix off-by-one positions 2017-12-13 08:48:42 +00:00
extra-flags.test [clangd] Emit ranges for clangd diagnostics, and fix off-by-one positions 2017-12-13 08:48:42 +00:00
fixits.test [clangd] Emit ranges for clangd diagnostics, and fix off-by-one positions 2017-12-13 08:48:42 +00:00
formatting.test Adds a json::Expr type to represent intermediate JSON expressions. 2017-11-06 15:40:30 +00:00
initialize-params-invalid.test [clangd] Document highlights for clangd 2017-12-12 12:27:47 +00:00
initialize-params.test [clangd] Document highlights for clangd 2017-12-12 12:27:47 +00:00
input-mirror.test Adds a json::Expr type to represent intermediate JSON expressions. 2017-11-06 15:40:30 +00:00
lit.local.cfg [clangd] Revert broken r318329 and disable tests on PS4 2017-11-15 21:33:56 +00:00
protocol.test [clangd] Switch from YAMLParser to JSONExpr 2017-11-28 09:37:43 +00:00
rename.test [clangd] Add rename support. 2017-11-09 11:30:04 +00:00
shutdown-with-exit.test [clangd] Handle exit notification (proper shutdown) 2017-10-25 08:45:41 +00:00
shutdown-without-exit.test [clangd] Handle exit notification (proper shutdown) 2017-10-25 08:45:41 +00:00
signature-help.test Adds a json::Expr type to represent intermediate JSON expressions. 2017-11-06 15:40:30 +00:00
too_large.test [clangd] Don't crash on extremely large JSON messages. 2017-10-27 17:06:41 +00:00
trace.test [clangd] New conventions for JSON-marshalling functions, centralize machinery 2017-11-30 21:32:29 +00:00
unsupported-method.test Adds a json::Expr type to represent intermediate JSON expressions. 2017-11-06 15:40:30 +00:00