summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/Quality.cpp
diff options
context:
space:
mode:
authorEric Liu <ioeric@google.com>2018-06-28 16:51:12 +0000
committerEric Liu <ioeric@google.com>2018-06-28 16:51:12 +0000
commitcdc5f6ad5c79a175c959f0dfb1a27f55e53892c5 (patch)
tree0cc13107d262897585b153def507eab63cdd4a2f /clang-tools-extra/clangd/Quality.cpp
parentdf93fe46e5d15457092eda3f702b2c57be274a2f (diff)
downloadbcm5719-llvm-cdc5f6ad5c79a175c959f0dfb1a27f55e53892c5.tar.gz
bcm5719-llvm-cdc5f6ad5c79a175c959f0dfb1a27f55e53892c5.zip
[clangd] Use log10 instead of the natural logrithm for usage boost.
llvm-svn: 335874
Diffstat (limited to 'clang-tools-extra/clangd/Quality.cpp')
-rw-r--r--clang-tools-extra/clangd/Quality.cpp5
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;
OpenPOWER on IntegriCloud