[PATCH] D95046: [clangd] Add option to use dirty file contents when building preambles.

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 17 02:13:40 PST 2022


njames93 added a comment.

In D95046#3247793 <https://reviews.llvm.org/D95046#3247793>, @sammccall wrote:

> Sorry about letting this sit. I think this is good to go, with a naming tweak.
>
> For the 14 cycle, it should be hidden: we may want to tweak the interactions with `didSave` reparsing etc, and there may be other unexpected wrinkles.
>
> Regarding moving to config: we should do this, but there's some dumb bikeshedding of names (mostly: does this go at the top level or do we want a `Parsing` block or something, will other things fit in there, etc). So a hidden flag seems like the easiest thing for now.

I've been using this locally for months. The one nit i have is if you edit a header file then switch to a different file, diagnostics aren't updated until you force clangd to reparse the file (by editing it for example).
However I'm not sure of a nice way around this that doesn't involve trying to rebuild the world when you make an edit to a header.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95046/new/

https://reviews.llvm.org/D95046



More information about the cfe-commits mailing list