summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/Quality.h
diff options
context:
space:
mode:
authorEric Liu <ioeric@google.com>2018-07-24 08:51:52 +0000
committerEric Liu <ioeric@google.com>2018-07-24 08:51:52 +0000
commitd7de81172e975a5305fe9dd8691c7cc0da1b66d0 (patch)
tree1d0e708a1564e960c65a1d32e639eb1e69c35290 /clang-tools-extra/clangd/Quality.h
parentd55661db3cba15aab1a7dcf12e13a2e000a8e051 (diff)
downloadbcm5719-llvm-d7de81172e975a5305fe9dd8691c7cc0da1b66d0.tar.gz
bcm5719-llvm-d7de81172e975a5305fe9dd8691c7cc0da1b66d0.zip
[clangd] Tune down quality score for class constructors so that it's ranked after class types.
Summary: Currently, class constructors have the same score as the class types, and they are often ranked before class types. This is often not desireable and can be annoying when snippet is enabled and constructor signatures are added. Metrics: ``` ================================================================================================== OVERALL ================================================================================================== Total measurements: 111117 (+0) All measurements: MRR: 64.06 (+0.20) Top-5: 75.73% (+0.14%) Top-100: 93.71% (+0.01%) Full identifiers: MRR: 98.25 (+0.55) Top-5: 99.04% (+0.03%) Top-100: 99.16% (+0.00%) Filter length 0-5: MRR: 15.23 (+0.02) 50.50 (-0.02) 65.04 (+0.11) 70.75 (+0.19) 74.37 (+0.25) 79.43 (+0.32) Top-5: 40.90% (+0.03%) 74.52% (+0.03%) 87.23% (+0.15%) 91.68% (+0.08%) 93.68% (+0.14%) 95.87% (+0.12%) Top-100: 68.21% (+0.02%) 96.28% (+0.07%) 98.43% (+0.00%) 98.72% (+0.00%) 98.74% (+0.01%) 98.81% (+0.00%) ================================================================================================== DEFAULT ================================================================================================== Total measurements: 57535 (+0) All measurements: MRR: 58.07 (+0.37) Top-5: 69.94% (+0.26%) Top-100: 90.14% (+0.03%) Full identifiers: MRR: 97.13 (+1.05) Top-5: 98.14% (+0.06%) Top-100: 98.34% (+0.00%) Filter length 0-5: MRR: 13.91 (+0.00) 38.53 (+0.01) 55.58 (+0.21) 63.63 (+0.30) 69.23 (+0.47) 72.87 (+0.60) Top-5: 24.99% (+0.00%) 62.70% (+0.06%) 82.80% (+0.30%) 88.66% (+0.16%) 92.02% (+0.27%) 93.53% (+0.21%) Top-100: 51.56% (+0.05%) 93.19% (+0.13%) 97.30% (+0.00%) 97.81% (+0.00%) 97.85% (+0.01%) 97.79% (+0.00%) ``` Remark: - The full-id completions have +1.05 MRR improvement. - There is no noticeable impact on EXPLICIT_MEMBER_ACCESS and WANT_LOCAL. Reviewers: sammccall Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D49667 llvm-svn: 337816
Diffstat (limited to 'clang-tools-extra/clangd/Quality.h')
-rw-r--r--clang-tools-extra/clangd/Quality.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/Quality.h b/clang-tools-extra/clangd/Quality.h
index 10a0a3ea20d..0aed496be6a 100644
--- a/clang-tools-extra/clangd/Quality.h
+++ b/clang-tools-extra/clangd/Quality.h
@@ -58,6 +58,7 @@ struct SymbolQualitySignals {
Macro,
Type,
Function,
+ Constructor,
Namespace,
Keyword,
} Category = Unknown;
OpenPOWER on IntegriCloud