[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:43:48 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL346671: [clangd] Don't show all refs results if -name is ambiguous in dexp. (authored by hokein, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
https://reviews.llvm.org/D54430
Files:
clang-tools-extra/trunk/clangd/index/dex/dexp/Dexp.cpp
Index: clang-tools-extra/trunk/clangd/index/dex/dexp/Dexp.cpp
===================================================================
--- clang-tools-extra/trunk/clangd/index/dex/dexp/Dexp.cpp
+++ clang-tools-extra/trunk/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.173689.patch
Type: text/x-patch
Size: 703 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181112/8e889295/attachment-0001.bin>
More information about the cfe-commits
mailing list