[clangd] Use log10 instead of the natural logrithm for usage boost.
llvm-svn: 335874
diff --git a/clang-tools-extra/clangd/Quality.cpp b/clang-tools-extra/clangd/Quality.cpp
index 6a329fb..3e3103f 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 @@
// 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;