hokein created this revision. hokein added a reviewer: ioeric. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ilya-biryukov.
For symbols in global namespace (without any scope), we need to add global scope "" to the fuzzy request. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54519 Files: clangd/index/dex/dexp/Dexp.cpp Index: clangd/index/dex/dexp/Dexp.cpp =================================================================== --- clangd/index/dex/dexp/Dexp.cpp +++ 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: clangd/index/dex/dexp/Dexp.cpp =================================================================== --- clangd/index/dex/dexp/Dexp.cpp +++ 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