~pali/llvm/clang-tools-extra-trunk

Viewing all changes in revision 3341.

  • Committer: ibiryukov
  • Date: 2018-05-24 14:49:23 UTC
  • Revision ID: svn-v4:91177308-0d34-0410-b5e6-96231b3b80d8:clang-tools-extra/trunk:333189
[clangd] Serve comments for headers decls from dynamic index only

Summary:
To fix a crash in code completion that occurrs when reading doc
comments from files that were updated after the preamble was
computed. In that case, the files on disk could've been changed and we
can't rely on finding the comment text with the same range anymore.

The current workaround is to not provide comments from the headers at
all and rely on the dynamic index instead.

A more principled solution would be to store contents of the files
read inside the preamble, but it is way harder to implement properly,
given that it would definitely increase the sizes of the preamble.

Together with D47272, this should fix all preamble-related crashes
we're aware of.

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: klimek, ioeric, MaskRay, jkorous, cfe-commits

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

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: