diff options
Diffstat (limited to 'clang-tools-extra/clangd/Quality.cpp')
-rw-r--r-- | clang-tools-extra/clangd/Quality.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang-tools-extra/clangd/Quality.cpp b/clang-tools-extra/clangd/Quality.cpp index 6a329fbe068..3e3103ff2e3 100644 --- a/clang-tools-extra/clangd/Quality.cpp +++ b/clang-tools-extra/clangd/Quality.cpp @@ -7,6 +7,7 @@ // //===---------------------------------------------------------------------===// #include "Quality.h" +#include <cmath> #include "URI.h" #include "index/Index.h" #include "clang/AST/ASTContext.h" @@ -147,8 +148,8 @@ float SymbolQualitySignals::evaluate() const { // 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 (References >= 3) - Score *= std::log(References); + if (References >= 10) + Score *= std::log10(References); if (Deprecated) Score *= 0.1f; |