[PATCH] D40548: [clangd] Symbol index interfaces and an in-memory index implementation.
Eric Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 14 07:43:48 PST 2017
ioeric added a comment.
In https://reviews.llvm.org/D40548#955289, @malaperle wrote:
> In https://reviews.llvm.org/D40548#947081, @ioeric wrote:
> > Hi Marc, the patch is not ready for review yet. I am still cleaning up the prototype and will let you know when it's ready for review.
> I guess it was ready to review since it was submitted? ;)
Sorry! I should've pinged you before landing this. My apologies! I am happy to address any comment you have.
Comment at: clangd/index/Index.h:134
+ virtual bool
+ fuzzyFind(Context &Ctx, const FuzzyFindRequest &Req,
+ std::function<void(const Symbol &)> Callback) const = 0;
> I think a more generic std::function would be useful, similar to the indexstore's filter
> bool searchSymbols(llvm::function_ref<bool(IndexRecordSymbol, bool &stop)> filter,
> llvm::function_ref<void(IndexRecordSymbol)> receiver)
Do you have an use case in mind which requires different filtering? This could probably be a separate interface.
I think the behavior of fuzzy finding is well-defined, and how filtering is done is an implementation detail. User-specified filter might make implementation less flexible, especially for large indexes that are not managed in memory.
rCTE Clang Tools Extra
More information about the cfe-commits