[PATCH] D44462: [clangd] Don't use DraftMgr in implementation of forceReparse.
Simon Marchi via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 14 06:57:11 PDT 2018
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 = CompileArgs.getCompileCommand(File);
+ DocVersion Version = DraftMgr.getVersion(File);
+ Path FileStr = File.str();
I was wondering if we should increment the version here. From what I understand, it is used to identify each version of the parse, so that when diagnostics are ready, we know if they are for the latest version (and should be sent to the user) or if they are stale and should be ignored. If we don't change the document content but change the compile commands, I would consider it as a new version, since the diagnostics coming from the same document but old compile commands should be considered stale.
Comment at: clangd/TUScheduler.h:62
+ /// Returns a list of currently tracked files. File starts being trakced on
+ /// first update() call to it and stops being tracked on remove() call.
rCTE Clang Tools Extra
More information about the cfe-commits