[PATCH] D54829: [clangd] Cleanup: make diagnostics callbacks from TUScheduler non-racy
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 22 07:21:02 PST 2018
ilya-biryukov added inline comments.
================
Comment at: clangd/ClangdServer.h:132
/// Remove \p File from list of tracked files, schedule a request to free
- /// resources associated with it.
+ /// resources associated with it. After this function returns, we guarantee
+ /// that no diagnostics for \p File will be delivered even if there are
----------------
sammccall wrote:
> I'm not sure we actually want to *guarantee* this in the API: this implementation serializes removeDocument and the diagnostics callback, but only because it was the most convenient.
>
> I'd suggest just "pending diagnostics for closed files may not be delivered". (and similarly for TUScheduler).
>
> Up to you though.
Yeah, it might be a bit stronger than what we guaranteed before (which was "you won't get stale diagnostics for a file that you reopen")
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D54829
More information about the cfe-commits
mailing list