MaskRay added inline comments.
================ Comment at: clangd/FuzzyMatch.h:61 bool allowMatch(int P, int W) const; - int skipPenalty(int W, Action Last) const; - int matchBonus(int P, int W, Action Last) const; + int missScore(int W, Action Last) const; + int matchScore(int P, int W, Action Last) const; ---------------- MaskRay wrote: > sammccall wrote: > > FWIW, I don't think this is an improvement - I think the clarity of purpose > > in names is more useful than having consistent signs in this case. > Keep `matchBonus` but rename `skipPenalty` to `missPenalty` ? Also note in the original scheme, the skip score does not need to be negative. Because Scores[PatN][WordN][] is used and each path takes the same number of positions (WordN). We can add an offset to all positional scores to make all of them non-negative. In the new scheme it does make sense to make them negative, as each path has now different number of positions. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44720 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits