cmath: Support clang's -fdelayed-template-parsing

r283051 added some functions to cmath (in namespace std) that have the
same name as functions in math.h (in the global namespace).  Clang's
limited support for `-fdelayed-template-parsing` chokes on this.  Rename
the ones in `cmath` and their uses in `complex` and the test.

rdar://problem/32848355

llvm-svn: 307357
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 66631a12b833ffffa643bb67042811fe163cebae
diff --git a/include/cmath b/include/cmath
index b41f247..917928a 100644
--- a/include/cmath
+++ b/include/cmath
@@ -549,7 +549,7 @@
 template <class _A1>
 _LIBCPP_ALWAYS_INLINE
 _LIBCPP_CONSTEXPR typename enable_if<is_floating_point<_A1>::value, bool>::type
-__libcpp_isnan(_A1 __lcpp_x) _NOEXCEPT
+__libcpp_isnan_or_builtin(_A1 __lcpp_x) _NOEXCEPT
 {
 #if __has_builtin(__builtin_isnan)
     return __builtin_isnan(__lcpp_x);
@@ -561,7 +561,7 @@
 template <class _A1>
 _LIBCPP_ALWAYS_INLINE
 _LIBCPP_CONSTEXPR typename enable_if<!is_floating_point<_A1>::value, bool>::type
-__libcpp_isnan(_A1 __lcpp_x) _NOEXCEPT
+__libcpp_isnan_or_builtin(_A1 __lcpp_x) _NOEXCEPT
 {
     return isnan(__lcpp_x);
 }
@@ -569,7 +569,7 @@
 template <class _A1>
 _LIBCPP_ALWAYS_INLINE
 _LIBCPP_CONSTEXPR typename enable_if<is_floating_point<_A1>::value, bool>::type
-__libcpp_isinf(_A1 __lcpp_x) _NOEXCEPT
+__libcpp_isinf_or_builtin(_A1 __lcpp_x) _NOEXCEPT
 {
 #if __has_builtin(__builtin_isinf)
     return __builtin_isinf(__lcpp_x);
@@ -581,7 +581,7 @@
 template <class _A1>
 _LIBCPP_ALWAYS_INLINE
 _LIBCPP_CONSTEXPR typename enable_if<!is_floating_point<_A1>::value, bool>::type
-__libcpp_isinf(_A1 __lcpp_x) _NOEXCEPT
+__libcpp_isinf_or_builtin(_A1 __lcpp_x) _NOEXCEPT
 {
     return isinf(__lcpp_x);
 }
@@ -589,7 +589,7 @@
 template <class _A1>
 _LIBCPP_ALWAYS_INLINE
 _LIBCPP_CONSTEXPR typename enable_if<is_floating_point<_A1>::value, bool>::type
-__libcpp_isfinite(_A1 __lcpp_x) _NOEXCEPT
+__libcpp_isfinite_or_builtin(_A1 __lcpp_x) _NOEXCEPT
 {
 #if __has_builtin(__builtin_isfinite)
     return __builtin_isfinite(__lcpp_x);
@@ -601,7 +601,7 @@
 template <class _A1>
 _LIBCPP_ALWAYS_INLINE
 _LIBCPP_CONSTEXPR typename enable_if<!is_floating_point<_A1>::value, bool>::type
-__libcpp_isfinite(_A1 __lcpp_x) _NOEXCEPT
+__libcpp_isfinite_or_builtin(_A1 __lcpp_x) _NOEXCEPT
 {
     return isfinite(__lcpp_x);
 }