[PATCH] D44720: [clangd] Simplify fuzzy matcher (sequence alignment) by removing some condition checks.
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 21 10:07:16 PDT 2018
MaskRay added inline comments.
================
Comment at: clangd/FuzzyMatch.cpp:96
return None;
return ScoreScale * std::min(PerfectBonus * PatN, std::max<int>(0, Best));
}
----------------
I also don't understand why it clamps the value to zero here. Negative values are also meaningful to me. Given that perfectBonus is only 3 it is very easy to get a negative value here.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D44720
More information about the cfe-commits
mailing list