[PATCH] D47274: [clangd] Serve comments for headers decls from dynamic index only

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

ilya-biryukov created this revision.
ilya-biryukov added a reviewer: sammccall.
Herald added subscribers: jkorous, MaskRay, ioeric, klimek.

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 https://reviews.llvm.org/D47272, this should all preamble-related crashes we're
aware of.

  rCTE Clang Tools Extra



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47274.148266.patch
Type: text/x-patch
Size: 6690 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180523/edcae639/attachment.bin>

More information about the cfe-commits mailing list