[clangd] FuzzyMatch: forbid tail-tail matches after a miss: [pat] !~ "panther"
authorSam McCall <sam.mccall@gmail.com>
Thu, 14 Jun 2018 13:50:30 +0000 (13:50 +0000)
committerSam McCall <sam.mccall@gmail.com>
Thu, 14 Jun 2018 13:50:30 +0000 (13:50 +0000)
commit8b2dcc1f6f468b6f3128d96a2b378818d0d9ecda
tree454a244c5ead358848f19f7d3f9bdcaf34967454
parentc3b5bad723336938105b88a1cdeed13d6fe9c03b
[clangd] FuzzyMatch: forbid tail-tail matches after a miss: [pat] !~ "panther"

Summary:
This is a small code change but vastly reduces noise in code completion results.
The intent of allowing this was to let [sc] ~ "strncpy" and [strcpy] ~ "strncpy"
however the benefits for unsegmented names aren't IMO worth the costs.

Test cases should be representative of the changes here.

Reviewers: ilya-biryukov

Subscribers: ioeric, MaskRay, jkorous, cfe-commits

Differential Revision: https://reviews.llvm.org/D47950

llvm-svn: 334712
clang-tools-extra/clangd/FuzzyMatch.cpp
clang-tools-extra/clangd/FuzzyMatch.h
clang-tools-extra/unittests/clangd/CodeCompleteTests.cpp
clang-tools-extra/unittests/clangd/FuzzyMatchTests.cpp