diff options
| author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2017-07-07 05:13:36 +0000 |
|---|---|---|
| committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2017-07-07 05:13:36 +0000 |
| commit | 66631a12b833ffffa643bb67042811fe163cebae (patch) | |
| tree | 50742974c69213fc33355ade56c4b05699592dde /libcxx/include/cmath | |
| parent | 6c4bfba8f3e2f08f5b42f8a18c3ab0d5a3f5e23c (diff) | |
| download | bcm5719-llvm-66631a12b833ffffa643bb67042811fe163cebae.tar.gz bcm5719-llvm-66631a12b833ffffa643bb67042811fe163cebae.zip | |
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
Diffstat (limited to 'libcxx/include/cmath')
| -rw-r--r-- | libcxx/include/cmath | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libcxx/include/cmath b/libcxx/include/cmath index b41f247af59..917928a1f42 100644 --- a/libcxx/include/cmath +++ b/libcxx/include/cmath @@ -549,7 +549,7 @@ hypot(_A1 __lcpp_x, _A2 __lcpp_y, _A3 __lcpp_z) _NOEXCEPT 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 @@ __libcpp_isnan(_A1 __lcpp_x) _NOEXCEPT 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 @@ __libcpp_isnan(_A1 __lcpp_x) _NOEXCEPT 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 @@ __libcpp_isinf(_A1 __lcpp_x) _NOEXCEPT 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 @@ __libcpp_isinf(_A1 __lcpp_x) _NOEXCEPT 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 @@ __libcpp_isfinite(_A1 __lcpp_x) _NOEXCEPT 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); } |

