[PATCH] D54430: [clangd] Don't show all refs results if -name is ambiguous in dexp.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 12 08:37:11 PST 2018
hokein created this revision.
hokein added a reviewer: ioeric.
Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ilya-biryukov.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D54430
Files:
clangd/index/dex/dexp/Dexp.cpp
Index: clangd/index/dex/dexp/Dexp.cpp
===================================================================
--- clangd/index/dex/dexp/Dexp.cpp
+++ clangd/index/dex/dexp/Dexp.cpp
@@ -218,6 +218,12 @@
IDs.push_back(*SID);
} else {
IDs = getSymbolIDsFromIndex(Name, Index);
+ if (IDs.size() > 1) {
+ outs() << formatv("The name {0} is ambiguous, found {1} different "
+ "symbols. Please use id flag to disambiguate.\n",
+ Name, IDs.size());
+ return;
+ }
}
RefsRequest RefRequest;
RefRequest.IDs.insert(IDs.begin(), IDs.end());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54430.173685.patch
Type: text/x-patch
Size: 631 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181112/2e724d9d/attachment.bin>
More information about the cfe-commits
mailing list