llvm-project/libcxx/test
Duncan P. N. Exon Smith 42f8eee150 cmath: Skip Libc for integral types in isinf, etc.
For std::isinf, the standard requires effectively calling isinf as
double from Libc for integral types. But integral types are never
infinite; we don't need to call Libc to return false.

Also short-circuit other functions where Libc won't have interesting
answers: signbit, fpclassify, isfinite, isnan, and isnormal.

I added correctness tests for integral types since we're no longer
deferring to Libc.

In review it was pointed out that in future revisions of the C++
standard we may add more types to std::is_arithmetic (e.g.,
std::is_fixed_point).  I'll leave it to a future commit to hack this to
allow using math functions on those.  We'll need to change things like
__libcpp_fpclassify anyway, so I'm not sure anything here would really
be future-proof.

https://reviews.llvm.org/D31561
rdar://problem/31361223

llvm-svn: 301060
2017-04-21 23:14:55 +00:00
..
libcxx update XFAIL comments with more details 2017-04-21 03:09:40 +00:00
std cmath: Skip Libc for integral types in isinf, etc. 2017-04-21 23:14:55 +00:00
support Cleanup _LIBCPP_HAS_NO_<c++11-feature> in support headers and final tests 2017-04-19 01:02:49 +00:00
CMakeLists.txt fix test coverage capture dirs 2017-03-11 05:28:09 +00:00
lit.cfg Move libcxx/test/libcxx python package into libcxx/utils/libcxx. 2017-02-09 23:18:11 +00:00
lit.site.cfg.in [libc++][CMake] Use debug MSVC runtimes when libc++ is built in debug mode 2017-01-14 07:54:39 +00:00
nothing_to_do.pass.cpp Test commit: Reverting whitespace changes 2014-07-17 05:10:03 +00:00