[PATCH] D57815: [clangd] Add type boost to fuzzy find in Dex.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 6 05:59:33 PST 2019
sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clangd/index/Index.h:457
std::vector<std::string> ProximityPaths;
-
- // FIXME(ibiryukov): add expected type to the request.
+ /// Preferred types of symbols.
+ std::vector<std::string> PreferredTypes;
----------------
should these be OpaqueType?
I think the only reason we use StringRef in Symbol is for the non-owning aspect.
otherwise indicate encoding in comment.
================
Comment at: clangd/index/dex/Dex.cpp:112
+ Token Tok(Token::Kind::Type, T);
+ const auto It = InvertedIndex.find(Tok);
+ if (It != InvertedIndex.end()) {
----------------
`BoostingIterators.push_back(Corpus.boost(iterator(Tok)))`?
================
Comment at: unittests/clangd/DexTests.cpp:703
+ Req.Query = "t";
+ // The best candidate can change depending on the proximity paths.
+ Req.Limit = 1;
----------------
proximity paths?
Repository:
rCTE Clang Tools Extra
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57815/new/
https://reviews.llvm.org/D57815
More information about the cfe-commits
mailing list