[PATCH] D64475: [clangd] Duplicate lines of semantic highlightings sent removed.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 16 02:26:16 PDT 2019
sammccall added a comment.
As discussed offline, it's a little scary that the highlight state for diffing lives in a separate map from TUScheduler's workers, but it's hard to fix without introducing lots of abstractions or layering violations.
It does seem like a good idea to move the diffing up to ClangdLSPServer, as it's fairly bound to protocol details. It needs to be reset in didClose (and maybe didOpen too, for safety - I think there's a race when a document is closed, then tokens are delivered...).
I'd tend to put the map/mutex directly in ClangdLSPServer rather than encapsulating it in the Differ object (again, because it's a protocol/lifetime detail rather than diffing logic itself) but up to you.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64475/new/
https://reviews.llvm.org/D64475
More information about the cfe-commits
mailing list