mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-10 01:55:08 +00:00
[clangd] Fix no results returned for global symbols in dexp
Summary: For symbols in global namespace (without any scope), we need to add global scope "" to the fuzzy request. Reviewers: ioeric Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D54519 llvm-svn: 346947
This commit is contained in:
parent
cc0829f3cb
commit
5e7486f518
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user