[PATCH] D54519: [clangd] Fix no results returned for global symbols in dexp
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 15 04:21:36 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL346947: [clangd] Fix no results returned for global symbols in dexp (authored by hokein, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
https://reviews.llvm.org/D54519
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
@@ -58,6 +58,10 @@
auto Names = splitQualifiedName(QualifiedName);
if (IsGlobalScope || !Names.first.empty())
Request.Scopes = {Names.first};
+ else
+ // QualifiedName refers to a symbol in global scope (e.g. "GlobalSymbol"),
+ // add the global scope to the request.
+ Request.Scopes = {""};
Request.Query = Names.second;
std::vector<SymbolID> SymIDs;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54519.174188.patch
Type: text/x-patch
Size: 630 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181115/b8a3caac/attachment.bin>
More information about the cfe-commits
mailing list