[clang] [libcxx] [Clang][libc++] Implement __is_nothrow_convertible and use it in libc++ (PR #80436)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 2 06:19:47 PST 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff a1df10da59e8eb0c1d90df81bf9000d2f7869328 dc3aafe0e3bd2e20121440efd8efa86263bd6b4b -- clang/lib/Sema/SemaExprCXX.cpp clang/test/SemaCXX/type-traits.cpp libcxx/include/__type_traits/is_nothrow_convertible.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libcxx/include/__type_traits/is_nothrow_convertible.h b/libcxx/include/__type_traits/is_nothrow_convertible.h
index 2f9b4f953c..bfc5a94cba 100644
--- a/libcxx/include/__type_traits/is_nothrow_convertible.h
+++ b/libcxx/include/__type_traits/is_nothrow_convertible.h
@@ -26,7 +26,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 20
-#if __has_builtin(__is_nothrow_convertible)
+# if __has_builtin(__is_nothrow_convertible)
template <class _Tp, class _Up>
struct is_nothrow_convertible : bool_constant<__is_nothrow_convertible(_Tp, _Up)> {};
@@ -34,7 +34,7 @@ struct is_nothrow_convertible : bool_constant<__is_nothrow_convertible(_Tp, _Up)
template <class _Tp, class _Up>
inline constexpr bool is_nothrow_convertible_v = __is_nothrow_convertible(_Tp, _Up);
-#else // __has_builtin(__is_nothrow_convertible)
+# else // __has_builtin(__is_nothrow_convertible)
template <typename _Tp>
void __test_noexcept(_Tp) noexcept;
@@ -53,7 +53,7 @@ struct is_nothrow_convertible
template <typename _Fm, typename _To>
inline constexpr bool is_nothrow_convertible_v = is_nothrow_convertible<_Fm, _To>::value;
-#endif // __has_builtin(__is_nothrow_convertible)
+# endif // __has_builtin(__is_nothrow_convertible)
#endif // _LIBCPP_STD_VER >= 20
``````````
</details>
https://github.com/llvm/llvm-project/pull/80436
More information about the cfe-commits
mailing list