[libcxx] r203126 - Fix a couple of -Wabsolute-value warnings in the libc++ tests
Joerg Sonnenberger
joerg at britannica.bec.de
Thu Mar 6 12:15:40 PST 2014
On Thu, Mar 06, 2014 at 04:27:18PM -0000, Marshall Clow wrote:
> 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);
This looks bogus as in: it shouldn't warn here.
Joerg
More information about the cfe-commits
mailing list