Fix MSVC "truncation from 'double' to 'float'" warnings. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 24 Oct 2018 19:31:24 +0000 (19:31 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 24 Oct 2018 19:31:24 +0000 (19:31 +0000)
llvm-svn: 345184

clang-tools-extra/clangd/Quality.cpp

index 6d0c376..640f543 100644 (file)
@@ -373,15 +373,15 @@ float SymbolRelevanceSignals::evaluate() const {
   if (!IsInstanceMember &&
       (Context == CodeCompletionContext::CCC_DotMemberAccess ||
        Context == CodeCompletionContext::CCC_ArrowMemberAccess)) {
-    Score *= 0.2;
+    Score *= 0.2f;
   }
 
   if (InBaseClass)
-    Score *= 0.5;
+    Score *= 0.5f;
 
   // Penalize for FixIts.
   if (NeedsFixIts)
-    Score *= 0.5;
+    Score *= 0.5f;
 
   return Score;
 }