Author: kadircet Date: Fri Dec 14 06:17:18 2018 New Revision: 349152 URL: http://llvm.org/viewvc/llvm-project?rev=349152&view=rev Log: [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 Modified: clang-tools-extra/trunk/clangd/index/dex/dexp/Dexp.cpp Modified: clang-tools-extra/trunk/clangd/index/dex/dexp/Dexp.cpp URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/index/dex/dexp/Dexp.cpp?rev=349152&r1=349151&r2=349152&view=diff ============================================================================== --- clang-tools-extra/trunk/clangd/index/dex/dexp/Dexp.cpp (original) +++ clang-tools-extra/trunk/clangd/index/dex/dexp/Dexp.cpp Fri Dec 14 06:17:18 2018 @@ -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); }); } }; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits