Keep a store of the preambles of all opened filed, plus
a configurable number of previously used preambles (default 1).
When building the AST for a TU, if the preamble for this
TU is not yet built, look through the stored premables
to find the best compatible preamble and use this
preamble to speed-up the AST build.
Details
- Reviewers
sammccall
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
This is a revisit of D97417 which is a bit out of date and fell into oblivion.
I've been using a forked version of clangd including this change for months on my day-to-day work and it does significantly improve my experience.
Some numbers showing the kind of improvement you can expect from this change can be found in D97417, they are still relevant.
@qchateau How should I interpret the abandoning of this patch -- did you run into a problem with the approach, or just don't have the time / interest to pursue it further?
@nridge after rebasing this change for several months, I find it less and less useful. It seems both clangd and the IDE I'm using are making significant improvements that make this changes less and less impactful.
I closed this revision as I feel that it now passed the threshold where the annoyance of maintaining it is greater than the return I'm getting from it
clang-format not found in user’s local PATH; not linting file.