[libcxx] r203126 - Fix a couple of -Wabsolute-value warnings in the libc++ tests
Marshall Clow
mclow.lists at gmail.com
Thu Mar 6 08:27:18 PST 2014
Author: marshall
Date: Thu Mar 6 10:27:17 2014
New Revision: 203126
URL: http://llvm.org/viewvc/llvm-project?rev=203126&view=rev
Log:
Fix a couple of -Wabsolute-value warnings in the libc++ tests
Modified:
libcxx/trunk/test/depr/depr.c.headers/math_h.pass.cpp
libcxx/trunk/test/numerics/complex.number/complex.transcendentals/atanh.pass.cpp
Modified: libcxx/trunk/test/depr/depr.c.headers/math_h.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/depr/depr.c.headers/math_h.pass.cpp?rev=203126&r1=203125&r2=203126&view=diff
==============================================================================
--- libcxx/trunk/test/depr/depr.c.headers/math_h.pass.cpp (original)
+++ libcxx/trunk/test/depr/depr.c.headers/math_h.pass.cpp Thu Mar 6 10:27:17 2014
@@ -82,9 +82,9 @@ void test_exp()
void test_fabs()
{
static_assert((std::is_same<decltype(fabs((double)0)), double>::value), "");
- static_assert((std::is_same<decltype(fabsf(0)), float>::value), "");
- static_assert((std::is_same<decltype(fabsl(0)), long double>::value), "");
- assert(fabs(-1) == 1);
+ static_assert((std::is_same<decltype(fabsf(0.f)), float>::value), "");
+ static_assert((std::is_same<decltype(fabsl(0.L)), long double>::value), "");
+ assert(fabs(-1.f) == 1);
}
void test_floor()
Modified: libcxx/trunk/test/numerics/complex.number/complex.transcendentals/atanh.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/numerics/complex.number/complex.transcendentals/atanh.pass.cpp?rev=203126&r1=203125&r2=203126&view=diff
==============================================================================
--- libcxx/trunk/test/numerics/complex.number/complex.transcendentals/atanh.pass.cpp (original)
+++ libcxx/trunk/test/numerics/complex.number/complex.transcendentals/atanh.pass.cpp Thu Mar 6 10:27:17 2014
@@ -51,7 +51,7 @@ void test_edges()
assert(std::signbit(x[i].real()) == std::signbit(r.real()));
assert(std::isnan(r.imag()));
}
- else if (abs(x[i].real()) == 1 && x[i].imag() == 0)
+ else if (std::abs(x[i].real()) == 1 && x[i].imag() == 0)
{
assert(std::isinf(r.real()));
assert(std::signbit(x[i].real()) == std::signbit(r.real()));
More information about the cfe-commits
mailing list