[clang] [clang-tools-extra] [llvm] clangd: Extend reference search with constructor calls through forwarding (PR #169742)
Nathan Ridge via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 15 22:22:50 PST 2025
HighCommander4 wrote:
> Now about the implementation, I did it this way thinking it is the least invasive form of doing so, but I just realized it might also be a neat alternative to instead inherit from `IndexASTConsumer` (so make it not `final` and expose it through the header), then I do not need to move the `IndexingContext.h` to another folder and also can just overwrite the few differences while the rest can stay the same. Unless there is a good reason why we do not want another level of inheritance.
Good question.
It looks like we're going to have to touch the libIndex API one way or another. The current implementation would make `IndexingContext` public. Your proposed alternative would make `IndexASTConsumer` public and non-`final`. Both feel like they're increasing the API surface with implementation details.
Since we're considering approaches that involve touching the libIndex API, what about one that minimizes the new API surface while leaving open the possibility of other libIndex users making use of our new capability: add a new field to `IndexingOptions`, something like `DeferIndexingToEndOfTranslationUnit`, and have `IndexASTConsumer` itself check for and respect that flag?
https://github.com/llvm/llvm-project/pull/169742
More information about the cfe-commits
mailing list