From cc8b507a60677b79fe180681834929e4764e6ece Mon Sep 17 00:00:00 2001 From: Kirill Bobyrev Date: Tue, 4 Sep 2018 15:45:56 +0000 Subject: [PATCH] [clangd] NFC: Change quality type to float Reviewed by: sammccall Differential Revision: https://reviews.llvm.org/D51636 llvm-svn: 341374 --- clang-tools-extra/clangd/index/Index.cpp | 2 +- clang-tools-extra/clangd/index/Index.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clang-tools-extra/clangd/index/Index.cpp b/clang-tools-extra/clangd/index/Index.cpp index 52eb42799af7b..7cbc92057ddf0 100644 --- a/clang-tools-extra/clangd/index/Index.cpp +++ b/clang-tools-extra/clangd/index/Index.cpp @@ -59,7 +59,7 @@ raw_ostream &operator<<(raw_ostream &OS, const Symbol &S) { return OS << S.Scope << S.Name; } -double quality(const Symbol &S) { +float quality(const Symbol &S) { // This avoids a sharp gradient for tail symbols, and also neatly avoids the // question of whether 0 references means a bad symbol or missing data. if (S.References < 3) diff --git a/clang-tools-extra/clangd/index/Index.h b/clang-tools-extra/clangd/index/Index.h index c1778e18932a3..bd21ead187887 100644 --- a/clang-tools-extra/clangd/index/Index.h +++ b/clang-tools-extra/clangd/index/Index.h @@ -250,7 +250,7 @@ llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const Symbol &S); // This currently falls in the range [1, ln(#indexed documents)]. // FIXME: this should probably be split into symbol -> signals // and signals -> score, so it can be reused for Sema completions. -double quality(const Symbol &S); +float quality(const Symbol &S); // An immutable symbol container that stores a set of symbols. // The container will maintain the lifetime of the symbols.