HomePhabricator

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

Authored by ilya-biryukov on May 24 2018, 8:50 AM.

Description

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

Summary:
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.

Reviewers: ioeric, sammccall

Reviewed By: ioeric

Subscribers: malaperle, klimek, javed.absar, MaskRay, jkorous, cfe-commits

Differential Revision: https://reviews.llvm.org/D47272

llvm-svn: 333196

Details

Committed
ilya-biryukovMay 24 2018, 8:50 AM
Reviewer
ioeric
Differential Revision
D47272: [clangd] Build index on preamble changes instead of the AST changes
Parents
rG8bd73573c3a3: Fix unused variable warnings. NFCI.
Branches
Unknown
Tags
Unknown