[PATCH] D53433: [clangd] auto-index stores symbols per-file instead of per-TU.
Eric Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 5 08:42:52 PST 2018
ioeric added inline comments.
Comment at: clangd/index/Background.cpp:235
+ IndexedFileDigests[Path] = FilesToUpdate.lookup(Path);
> This call is already thread-safe, no need for it to be under lock.
This is for making sure that the update of digest and index data is atomic. If FileSymbols update is not in the lock, we might get the wrong digest for the indexed symbols in corner cases (e.g. T1 updates digest -> T2 updates digest -> T2 update symbols -> T1 updates symbols ).
rCTE Clang Tools Extra
More information about the cfe-commits