Author: aaronballman
Date: Fri May 18 07:53:32 2018
New Revision: 332723

URL: http://llvm.org/viewvc/llvm-project?rev=332723&view=rev
Log:
Silence more truncation warnings; NFC.

Modified:
    clang-tools-extra/trunk/unittests/clangd/QualityTests.cpp

Modified: clang-tools-extra/trunk/unittests/clangd/QualityTests.cpp
URL: 
http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/clangd/QualityTests.cpp?rev=332723&r1=332722&r2=332723&view=diff
==============================================================================
--- clang-tools-extra/trunk/unittests/clangd/QualityTests.cpp (original)
+++ clang-tools-extra/trunk/unittests/clangd/QualityTests.cpp Fri May 18 
07:53:32 2018
@@ -102,15 +102,15 @@ TEST(QualityTests, SymbolRelevanceSignal
   EXPECT_LT(Forbidden.evaluate(), Default.evaluate());
 
   SymbolRelevanceSignals PoorNameMatch;
-  PoorNameMatch.NameMatch = 0.2;
+  PoorNameMatch.NameMatch = 0.2f;
   EXPECT_LT(PoorNameMatch.evaluate(), Default.evaluate());
 }
 
 TEST(QualityTests, SortText) {
-  EXPECT_LT(sortText(std::numeric_limits<float>::infinity()), 
sortText(1000.2));
-  EXPECT_LT(sortText(1000.2), sortText(1));
-  EXPECT_LT(sortText(1), sortText(0.3));
-  EXPECT_LT(sortText(0.3), sortText(0));
+  EXPECT_LT(sortText(std::numeric_limits<float>::infinity()), 
sortText(1000.2f));
+  EXPECT_LT(sortText(1000.2f), sortText(1));
+  EXPECT_LT(sortText(1), sortText(0.3f));
+  EXPECT_LT(sortText(0.3f), sortText(0));
   EXPECT_LT(sortText(0), sortText(-10));
   EXPECT_LT(sortText(-10), sortText(-std::numeric_limits<float>::infinity()));
 


_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to