This is achieved by calculating newly added includes and implicitly
parsing them as if they were part of the main file.
This also gets rid of the need for consistent preamble reads.
Differential D77392
[clangd] Make signatureHelp work with stale preambles kadircet on Apr 3 2020, 6:35 AM. Authored by
Details This is achieved by calculating newly added includes and implicitly This also gets rid of the need for consistent preamble reads.
Diff Detail
Event TimelineComment Actions This is the perfect feature to start with (doesn't actually need any location transforms, lets us drop TUScheduler features), so well done for finding that. That said, high-level comments mostly about preamble patching in general rather than this particular case.
Comment Actions This is ready for another round. To summarize the current state:
Things that I don't like about current state:
Comment Actions This looks pretty good! Haven't reviewed the tests or removal of consistent preamble support yet. (Mostly note-to-self)
Comment Actions
Comment Actions Great stuff!
Comment Actions
|
This is going to be used in other places where we parse too, we'll want some abstraction to encapsulate the analysis, the tweaks to CompilerInvocation, and (for other uses) mapping of locations from the preamble file and injected regions.
As discussed offline, I think injecting by synthesizing a header snippet which is mapped into the VFS and then added to PreprocessorOpts.Includes is preferable to tweaking the CompilerInvocation directly:
So I'd probably suggest something like