This revision was automatically updated to reflect the committed changes.
sammccall marked 2 inline comments as done.
Closed by commit rGc5263a4e84cc: [clangd] Fix race in FileIndex that sometimes
temporarily lost updates. (authored by sammccall).
Changed prior to commit:
sammccall marked 5 inline comments as done.
sammccall added inline comments.
Comment at: clang-tools-extra/clangd/index/FileIndex.cpp:269
+
+++this->Version;
+if (Version)
kadircet wrote:
> Bumping the version in `update` and just exposing it in
kadircet added inline comments.
Comment at: clang-tools-extra/clangd/index/FileIndex.h:97
+ unsigned Version = 0;
llvm::StringMap> SymbolsSnapshot;
oh and also maybe use `size_t` ?
as there's only one (well three actually, if you count both preamble and
kadircet accepted this revision.
kadircet added a comment.
This revision is now accepted and ready to land.
LGTM, thanks!
Comment at: clang-tools-extra/clangd/index/FileIndex.cpp:269
+
+++this->Version;
+if (Version)
Bumping the version in `update` and
sammccall created this revision.
sammccall added a reviewer: kadircet.
Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay,
ilya-biryukov.
Herald added a project: clang.
FileIndex was built out of threadsafe components, so update() didn't have data
races, but wasn't