[PATCH] D40060: [clangd] Fuzzy match scorer
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 30 10:46:04 PST 2017
sammccall updated this revision to Diff 124968.
sammccall marked 5 inline comments as done.
sammccall added a comment.
- added more VSCode tests, and made test assert matched characters. This uncovered algorithm problems
- cache now includes "did previous character match" in the key (scoring depends on this, so we gave incorrect results)
- added a penalty for non-consecutive matches
- first character matching inside a segment downgraded from a ban to a penalty This allows [stream] to match "istream"
- don't award case bonuses if the query is all lowercase. This helps matches like [ccm] -> [c]ode[C]ompletec[m] compete with [c]odeComplete[cm]
https://reviews.llvm.org/D40060
Files:
clangd/CMakeLists.txt
clangd/FuzzyMatch.cpp
clangd/FuzzyMatch.h
unittests/clangd/CMakeLists.txt
unittests/clangd/FuzzyMatchTests.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40060.124968.patch
Type: text/x-patch
Size: 29651 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171130/dc60c46a/attachment-0001.bin>
More information about the cfe-commits
mailing list