llvm-project/clang-tools-extra/test
Simon Marchi 9808262ede [clangd] Support incremental document syncing
Summary:
This patch adds support for incremental document syncing, as described
in the LSP spec.  The protocol specifies ranges in terms of Position (a
line and a character), and our drafts are stored as plain strings.  So I
see two things that may not be super efficient for very large files:

- Converting a Position to an offset (the positionToOffset function)
  requires searching for end of lines until we reach the desired line.
- When we update a range, we construct a new string, which implies
  copying the whole document.

However, for the typical size of a C++ document and the frequency of
update (at which a user types), it may not be an issue.  This patch aims
at getting the basic feature in, and we can always improve it later if
we find it's too slow.

Signed-off-by: Simon Marchi <simon.marchi@ericsson.com>

Reviewers: malaperle, ilya-biryukov

Reviewed By: ilya-biryukov

Subscribers: MaskRay, klimek, mgorny, ilya-biryukov, jkorous-apple, ioeric, cfe-commits

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

llvm-svn: 328500
2018-03-26 14:41:40 +00:00
..
Unit Assume the shared library path variable is LD_LIBRARY_PATH on systems 2018-01-20 14:34:33 +00:00
change-namespace [change-namepsace] make it possible to whitelist symbols so they don't get updated. 2017-02-24 11:54:45 +00:00
clang-apply-replacements Avoid assumption that lit tests are writable. NFC 2018-01-08 15:49:40 +00:00
clang-doc [clang-doc] Reland "[clang-doc] Setup clang-doc frontend framework" 2018-03-22 23:34:46 +00:00
clang-move [clang-move] Fix the failing test caused by changes in clang-format. 2018-03-19 19:13:03 +00:00
clang-query Add a makefile for clang-query. Patch by Alex Horn! 2014-02-18 19:46:01 +00:00
clang-reorder-fields [clang-reorder-fields] Emit warning when reordering breaks member init list dependencies 2017-07-30 06:43:03 +00:00
clang-tidy clang-tidy, modularize: return non-zero exit code on errors 2018-03-22 14:18:20 +00:00
clangd [clangd] Support incremental document syncing 2018-03-26 14:41:40 +00:00
include-fixer [cmake] Support running extra clang tool tests without static analyzer 2017-08-29 05:58:08 +00:00
modularize clang-tidy, modularize: return non-zero exit code on errors 2018-03-22 14:18:20 +00:00
pp-trace test: use target triple for the test 2018-02-07 02:27:34 +00:00
.clang-format
CMakeLists.txt [clang-doc] Reland "[clang-doc] Setup clang-doc frontend framework" 2018-03-22 23:34:46 +00:00
lit.cfg run-clang-tidy: forward clang-tidy exit status 2018-03-19 14:43:59 +00:00
lit.site.cfg.in Reland "[lit] Adding config initialization to lit tests in clang-tools-extra" 2018-03-21 18:50:26 +00:00