[PATCH] D47272: [clangd] Build index on preamble changes instead of the AST changes

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 23 11:25:56 PDT 2018


ilya-biryukov created this revision.
ilya-biryukov added reviewers: ioeric, sammccall.
Herald added subscribers: jkorous, MaskRay, javed.absar, klimek.

This is more efficient and avoids data races when reading files that
come from the preamble. The staleness can occur when reading a file
from disk that changed after the preamble was built. This can lead to
crashes, e.g. when parsing comments.

We do not to rely on symbols from the main file anyway, since any info
that those provide can always be taken from the AST.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D47272

Files:
  clangd/ClangdServer.cpp
  clangd/ClangdUnit.cpp
  clangd/ClangdUnit.h
  clangd/TUScheduler.cpp
  clangd/TUScheduler.h
  clangd/index/FileIndex.cpp
  clangd/index/FileIndex.h
  unittests/clangd/FileIndexTests.cpp
  unittests/clangd/TestTU.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47272.148258.patch
Type: text/x-patch
Size: 12804 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180523/4205a26b/attachment.bin>


More information about the cfe-commits mailing list