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.
Paths
| Differential D77392
[clangd] Make signatureHelp work with stale preambles ClosedPublic Authored by kadircet on Apr 3 2020, 6:35 AM.
Details Summary This is achieved by calculating newly added includes and implicitly This also gets rid of the need for consistent preamble reads.
Diff Detail
Event Timelinekadircet retitled this revision from [clangd] Make signatureHelp work with stale preambles to [WIP][clangd] Make signatureHelp work with stale preambles.Apr 6 2020, 1:40 AM kadircet added a child revision: D77644: [clangd] Handle additional includes while parsing ASTs.Apr 7 2020, 5:33 AM Comment 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.
kadircet added inline comments.
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)
kadircet added inline comments.
kadircet marked 2 inline comments as done. Comment Actions
Comment Actions Great stuff!
This revision is now accepted and ready to land.Apr 20 2020, 3:07 PM kadircet marked 2 inline comments as done. Comment Actions
kadircet retitled this revision from [WIP][clangd] Make signatureHelp work with stale preambles to [clangd] Make signatureHelp work with stale preambles.Apr 21 2020, 1:19 AM Closed by commit rG2214b9076f1d: [clangd] Make signatureHelp work with stale preambles (authored by kadircet). · Explain WhyApr 21 2020, 1:35 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 254779 clang-tools-extra/clangd/ClangdServer.cpp
clang-tools-extra/clangd/CodeComplete.cpp
clang-tools-extra/clangd/Headers.h
clang-tools-extra/clangd/Headers.cpp
clang-tools-extra/clangd/Preamble.h
clang-tools-extra/clangd/Preamble.cpp
clang-tools-extra/clangd/TUScheduler.h
clang-tools-extra/clangd/TUScheduler.cpp
clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp
clang-tools-extra/clangd/unittests/HeadersTests.cpp
clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp
|
clang-format-diff not found in user's PATH; not linting file.