Page MenuHomePhabricator

[clangd] Limit the index-returned results in dexp.

Authored by hokein on Nov 5 2018, 8:08 AM.



When the limit of FuzzyFindRequest is not specified, MemIndex and
DexIndex will set it MAX_UINT, which doesn't make sense in the active tool dexp
(we might get lots results). This patch restricts it to a small number.

Event Timeline

hokein created this revision.Nov 5 2018, 8:08 AM
ioeric added inline comments.Nov 5 2018, 8:14 AM

I think we should make it configurable like what we do here.

hokein updated this revision to Diff 172598.Nov 5 2018, 8:47 AM

Address review comment.

hokein added inline comments.Nov 5 2018, 8:47 AM

Made it configurable for Lookup. Limit option is used to restrict the number for final results, it is reasonable for FuzzyFind, and Lookup

But for Refs, it means the number of different symbols, not the number of final results, I still hard-code it.

hokein updated this revision to Diff 172736.Nov 6 2018, 3:10 AM

Update based on the offline discussion.

ioeric added inline comments.Nov 6 2018, 3:14 AM

Maybe The max number of symbols with the same name but different IDs to display. Only applies when -name is set.? I think it's worth calling out that there can be different IDs for the same name.


I think you would want to set limit to >1. Currently, the error condition will never be triggered?

hokein abandoned this revision.Nov 12 2018, 8:28 AM