[PATCH] D49667: [clangd] Tune down quality score for class constructors so that it's ranked after class types.

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 24 01:30:12 PDT 2018


ilya-biryukov added inline comments.


================
Comment at: clangd/Quality.cpp:211
+  case Constructor:
+    Score *= 1.0f; // Rank class constructors after class types.
+    break;
----------------
ioeric wrote:
> ilya-biryukov wrote:
> > NIT: This does not seem to change the score, right? Maybe just the assignment or merge with the `Unknown` case?
> Previously, constructors are treated as `Function` and got 1.1 boost. Now it doesn't get a boost. Merging with `Unknown` might make sense too, but I wonder if we want to be more explicit. Happy to change.
Have no statement for a no-op instead of "multiply by 1.0" seems clearer.
Other than that, no preferences on my side.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D49667





More information about the cfe-commits mailing list