[PATCH] D44462: [clangd] Don't use DraftMgr in implementation of forceReparse.

2018-03-14 Thread Mailing List "cfe-commits" via Phabricator via cfe-commits
cfe-commits added a comment. - F5892491: msg-4647-88.txt Repository: rL LLVM https://reviews.llvm.org/D44462 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

Re: [PATCH] D44462: [clangd] Don't use DraftMgr in implementation of forceReparse.

2018-03-14 Thread Sam McCall via cfe-commits
On Wed, Mar 14, 2018, 19:39 Simon Marchi via Phabricator < revi...@reviews.llvm.org> wrote: > simark added inline comments. > > > > Comment at: clangd/TUScheduler.h:69 > + /// FIXME: remove the callback from this function > + void updateCompileCommand(PathRef File, tooling::Comp

[PATCH] D44462: [clangd] Don't use DraftMgr in implementation of forceReparse.

2018-03-14 Thread Simon Marchi via Phabricator via cfe-commits
simark added inline comments. Comment at: clangd/TUScheduler.h:69 + /// FIXME: remove the callback from this function + void updateCompileCommand(PathRef File, tooling::CompileCommand NewCommand, +IntrusiveRefCntPtr FS, ilya-biryukov

[PATCH] D44462: [clangd] Don't use DraftMgr in implementation of forceReparse.

2018-03-14 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL327532: [clangd] Remove forceReparse, add a flag to addDocument instead (authored by ibiryukov, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D44

[PATCH] D44462: [clangd] Don't use DraftMgr in implementation of forceReparse.

2018-03-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: unittests/clangd/SyncAPI.h:23 +void runAddDocument(ClangdServer &Server, PathRef File, StringRef Contents, +bool SkipCache = false); sammccall wrote: > it's slightly odd that wantdiagnostics i

[PATCH] D44462: [clangd] Don't use DraftMgr in implementation of forceReparse.

2018-03-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 138397. ilya-biryukov marked 2 inline comments as done. ilya-biryukov added a comment. - Add WantDiagnostics param to runAddDocument - Revert changes in TUScheduler Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44462 Files: clangd/

[PATCH] D44462: [clangd] Don't use DraftMgr in implementation of forceReparse.

2018-03-14 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. Comment at: clangd/TUScheduler.cpp:220 +FileInputs = std::move(Inputs); +rebuildASTLocked(WantDiags, std::move(OnUpdated)); }; you might want to inline this function here again - it's n

[PATCH] D44462: [clangd] Don't use DraftMgr in implementation of forceReparse.

2018-03-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/TUScheduler.h:69 + /// FIXME: remove the callback from this function + void updateCompileCommand(PathRef File, tooling::CompileCommand NewCommand, +IntrusiveRefCntPtr FS, sammcc

[PATCH] D44462: [clangd] Don't use DraftMgr in implementation of forceReparse.

2018-03-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 138394. ilya-biryukov marked 2 inline comments as done. ilya-biryukov added a comment. - Remove TUScheduler::updateCompileCommands, add a new optional parameter to clear the cache of compile commands instead - Address review comments Repository: rCT

[PATCH] D44462: [clangd] Don't use DraftMgr in implementation of forceReparse.

2018-03-14 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/ClangdServer.cpp:143 + tooling::CompileCommand NewCommand = CompileArgs.getCompileCommand(File); + DocVersion Version = DraftMgr.getVersion(File); + Path FileStr = File.str(); simark wrote: > I was wondering

[PATCH] D44462: [clangd] Don't use DraftMgr in implementation of forceReparse.

2018-03-14 Thread Simon Marchi via Phabricator via cfe-commits
simark added inline comments. Comment at: clangd/TUScheduler.h:69 + /// FIXME: remove the callback from this function + void updateCompileCommand(PathRef File, tooling::CompileCommand NewCommand, +IntrusiveRefCntPtr FS, sammccall wro

[PATCH] D44462: [clangd] Don't use DraftMgr in implementation of forceReparse.

2018-03-14 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. This patch is the right direction, but if you're up for it we can simplify interfaces further I think. Comment at: clangd/TUScheduler.h:62 + /// Returns a list of currently tracked files. File starts being trakced on + /// first update() call to

[PATCH] D44462: [clangd] Don't use DraftMgr in implementation of forceReparse.

2018-03-14 Thread Simon Marchi via Phabricator via cfe-commits
simark accepted this revision. simark added a comment. This revision is now accepted and ready to land. I rebased my patch (https://reviews.llvm.org/D44408) on top of this one, it looks good. Comment at: clangd/ClangdServer.cpp:143 + tooling::CompileCommand NewCommand = Compi

[PATCH] D44462: [clangd] Don't use DraftMgr in implementation of forceReparse.

2018-03-14 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: sammccall. Herald added subscribers: ioeric, jkorous-apple, klimek. To make the removal of DraftMgr from ClangdServer easier (https://reviews.llvm.org/D44408). Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44