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;


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;
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to