summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp b/clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp
index 2a245837b47..1e6a6785506 100644
--- a/clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp
+++ b/clang-tools-extra/clangd/index/dex/dexp/Dexp.cpp
@@ -58,6 +58,10 @@ std::vector<SymbolID> getSymbolIDsFromIndex(StringRef QualifiedName,
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;
OpenPOWER on IntegriCloud