ilya-biryukov added a reviewer: ilya-biryukov. ilya-biryukov requested changes to this revision. ilya-biryukov added a comment. This revision now requires changes to proceed.
We shouldn't add `Contents` parameter to every method, it would defeat the purpose of caching ASTs and won't allow to properly manage lifetimes of the indexes. The most tricky part is getting rid of `DraftMgr` in `forceReparse`. Here's a change that removes usages of it there: https://reviews.llvm.org/D44462`, it should be much easier to make it work when it lands. Any other reason why we need to add them? ================ Comment at: clangd/ClangdLSPServer.h:87 + /// conversions in outside code, maybe there's a way to get rid of it. + llvm::Optional<std::string> getDocument(PathRef File); + ---------------- We can remove this function now, it is equivalent to a one-liner `DraftMgr.getDraft(File).Draft` Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44408 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits