[llvm] 182d1c2 - [DebugInfo] Fix MSVC warning: "truncation from 'double' to 'float'"
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 21 02:16:57 PDT 2022
Author: Simon Pilgrim
Date: 2022-10-21T10:16:40+01:00
New Revision: 182d1c2a6289a1fdf78b5d0d3cc6b970ff29b76b
URL: https://github.com/llvm/llvm-project/commit/182d1c2a6289a1fdf78b5d0d3cc6b970ff29b76b
DIFF: https://github.com/llvm/llvm-project/commit/182d1c2a6289a1fdf78b5d0d3cc6b970ff29b76b.diff
LOG: [DebugInfo] Fix MSVC warning: "truncation from 'double' to 'float'"
Added:
Modified:
llvm/unittests/DebugInfo/LogicalView/LocationRangesTest.cpp
Removed:
################################################################################
diff --git a/llvm/unittests/DebugInfo/LogicalView/LocationRangesTest.cpp b/llvm/unittests/DebugInfo/LogicalView/LocationRangesTest.cpp
index cc0c03578f2f..1163fabf84fb 100644
--- a/llvm/unittests/DebugInfo/LogicalView/LocationRangesTest.cpp
+++ b/llvm/unittests/DebugInfo/LogicalView/LocationRangesTest.cpp
@@ -531,11 +531,11 @@ void ReaderTestCoverage::initElements() {
// Before the changes: Parameter: CoveragePercentage = 100.00
// After the changes: Parameter: CoveragePercentage = 100.00
- EXPECT_FLOAT_EQ(Parameter->getCoveragePercentage(), 100.00);
+ EXPECT_FLOAT_EQ(Parameter->getCoveragePercentage(), 100.00f);
// Before the changes: Variable: CoveragePercentage = 1000.00
// After the changes: Variable: CoveragePercentage = 56.83
- EXPECT_FLOAT_EQ(Variable->getCoveragePercentage(), 56.83);
+ EXPECT_FLOAT_EQ(Variable->getCoveragePercentage(), 56.83f);
}
TEST(LogicalViewTest, LocationRanges) {
More information about the llvm-commits
mailing list