[PATCH] D54106: [clangd] Limit the index-returned results in dexp.
Eric Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 6 03:14:57 PST 2018
ioeric added inline comments.
================
Comment at: clangd/index/dex/dexp/Dexp.cpp:166
+ cl::init(10),
+ cl::desc("Max results to display. This flag is only meaningful when -name"
+ " is set."),
----------------
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.
================
Comment at: clangd/index/dex/dexp/Dexp.cpp:227
} else {
- IDs = getSymbolIDsFromIndex(Name, Index);
+ IDs = getSymbolIDsFromIndex(Name, Index, /*Limit=*/1);
+ if (IDs.size() != 1) {
----------------
I think you would want to set limit to >1. Currently, the error condition will never be triggered?
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D54106
More information about the cfe-commits
mailing list