From 1b65b376ae45a335177a8c3f6f5bf1efa77255cc Mon Sep 17 00:00:00 2001 From: Kadir Cetinkaya Date: Fri, 14 Dec 2018 14:17:18 +0000 Subject: [PATCH] [dexp] Change FuzzyFind to also print scope of symbols Summary: When there are multiple symbols in the result of a fuzzy find with the same name, one has to perform an additional query to figure out which of those symbols are coming from the "interesting" scope. This patch prints the scope in fuzzy find results to get rid of the second symbol. Reviewers: hokein Subscribers: ilya-biryukov, ioeric, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D55705 llvm-svn: 349152 --- clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp b/clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp index 4099b3d..795173c 100644 --- a/clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp +++ b/clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp @@ -149,7 +149,8 @@ class FuzzyFind : public Command { outs() << formatv(OutputFormat, "Rank", "Symbol ID", "Symbol Name"); size_t Rank = 0; Index->fuzzyFind(Request, [&](const Symbol &Sym) { - outs() << formatv(OutputFormat, Rank++, Sym.ID.str(), Sym.Name); + outs() << formatv(OutputFormat, Rank++, Sym.ID.str(), + Sym.Scope + Sym.Name); }); } }; -- 2.7.4