[PATCH] D82891: [clangd] Fix race in FileIndex that sometimes temporarily lost updates.

2020-07-01 Thread Sam McCall via Phabricator via cfe-commits
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:

[PATCH] D82891: [clangd] Fix race in FileIndex that sometimes temporarily lost updates.

2020-07-01 Thread Sam McCall via Phabricator via cfe-commits
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

[PATCH] D82891: [clangd] Fix race in FileIndex that sometimes temporarily lost updates.

2020-07-01 Thread Kadir Cetinkaya via Phabricator via cfe-commits
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

[PATCH] D82891: [clangd] Fix race in FileIndex that sometimes temporarily lost updates.

2020-07-01 Thread Kadir Cetinkaya via Phabricator via cfe-commits
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

[PATCH] D82891: [clangd] Fix race in FileIndex that sometimes temporarily lost updates.

2020-06-30 Thread Sam McCall via Phabricator via cfe-commits
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