[libcxx-commits] [libcxx] db7db68 - [libc++] Use __is_array if the builtin is fixed (#93037)
via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jul 5 04:12:37 PDT 2024
Author: Nikolas Klauser
Date: 2024-07-05T13:12:33+02:00
New Revision: db7db687a6b72f79ecd165603e805c4292ddfd6d
URL: https://github.com/llvm/llvm-project/commit/db7db687a6b72f79ecd165603e805c4292ddfd6d
DIFF: https://github.com/llvm/llvm-project/commit/db7db687a6b72f79ecd165603e805c4292ddfd6d.diff
LOG: [libc++] Use __is_array if the builtin is fixed (#93037)
Added:
Modified:
libcxx/include/__type_traits/is_array.h
Removed:
################################################################################
diff --git a/libcxx/include/__type_traits/is_array.h b/libcxx/include/__type_traits/is_array.h
index 5b0e0e6f46b818..dc23de28d2c63b 100644
--- a/libcxx/include/__type_traits/is_array.h
+++ b/libcxx/include/__type_traits/is_array.h
@@ -19,9 +19,8 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-// TODO: Clang incorrectly reports that __is_array is true for T[0].
-// Re-enable the branch once https://llvm.org/PR54705 is fixed.
-#if __has_builtin(__is_array) && 0
+#if __has_builtin(__is_array) && \
+ (!defined(_LIBCPP_COMPILER_CLANG_BASED) || (defined(_LIBCPP_CLANG_VER) && _LIBCPP_CLANG_VER >= 1900))
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_array : _BoolConstant<__is_array(_Tp)> {};
More information about the libcxx-commits
mailing list