[PATCH] D50555: [clangd] Introduce scoring mechanism for SignatureInformations.
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 10 07:10:55 PDT 2018
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
Thanks! LGTM with a few NITs
================
Comment at: clangd/CodeComplete.cpp:687
+struct ScoredSignatureGreater {
+ bool operator()(const ScoredSignature &L, const ScoredSignature &R) {
+ // Ordering follows:
----------------
NIT: Maybe make it a function with a descriptive name, e.g. `hasBetterSignature`?
We could call it in a lambda, should make the code even clearer.
================
Comment at: clangd/CodeComplete.cpp:755
+ ScoredSignatureGreater());
+ for (const auto &SS : ScoredSignatures) {
+ SigHelp.signatures.push_back(SS.second);
----------------
NIT: remove braces around the single-statement loop body
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50555
More information about the cfe-commits
mailing list