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());