[PATCH] D44272: [clangd] Support incremental document syncing
Simon Marchi via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 21 09:34:21 PDT 2018
simark marked 34 inline comments as done.
simark added inline comments.
================
Comment at: clangd/DraftStore.h:36
/// Replace contents of the draft for \p File with \p Contents.
- void updateDraft(PathRef File, StringRef Contents);
+ void addDraft(PathRef File, StringRef Contents);
+
----------------
ilya-biryukov wrote:
> Could we add versions from LSP's `VersionedTextDocumentIdentifier` here and make the relevant sanity checks?
> Applying diffs to the wrong version will cause everything to fall apart, so we should detect this error and signal it to the client as soon as possible.
I agree that applying diffs to the wrong version will break basically everything, but even if we detect a version mismatch, I don't see what we could do, since we don't have a mean to report the error to the client. The only thing we could do is log it (which we already do.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D44272
More information about the cfe-commits
mailing list