[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:04:01 PDT 2018


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;
----------------
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` ?


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D44720





More information about the cfe-commits mailing list