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



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to