hokein created this revision. hokein added a reviewer: ioeric. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ilya-biryukov.
We should allow symbols from any scope in dexp results, othewise `find StringRef` doesn't return any results (llvm::StringRef). Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D54427 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 @@ -52,6 +52,7 @@ std::vector<SymbolID> getSymbolIDsFromIndex(StringRef QualifiedName, const SymbolIndex *Index) { FuzzyFindRequest Request; + Request.AnyScope = true; // Remove leading "::" qualifier as FuzzyFind doesn't need leading "::" // qualifier for global scope. bool IsGlobalScope = QualifiedName.consume_front("::"); @@ -134,6 +135,7 @@ FuzzyFindRequest Request; Request.Limit = Limit; Request.Query = Query; + Request.AnyScope = true; if (Scopes.getNumOccurrences() > 0) { SmallVector<StringRef, 8> Scopes; StringRef(this->Scopes).split(Scopes, ',');
Index: clangd/index/dex/dexp/Dexp.cpp =================================================================== --- clangd/index/dex/dexp/Dexp.cpp +++ clangd/index/dex/dexp/Dexp.cpp @@ -52,6 +52,7 @@ std::vector<SymbolID> getSymbolIDsFromIndex(StringRef QualifiedName, const SymbolIndex *Index) { FuzzyFindRequest Request; + Request.AnyScope = true; // Remove leading "::" qualifier as FuzzyFind doesn't need leading "::" // qualifier for global scope. bool IsGlobalScope = QualifiedName.consume_front("::"); @@ -134,6 +135,7 @@ FuzzyFindRequest Request; Request.Limit = Limit; Request.Query = Query; + Request.AnyScope = true; if (Scopes.getNumOccurrences() > 0) { SmallVector<StringRef, 8> Scopes; StringRef(this->Scopes).split(Scopes, ',');
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits