[libcxx-commits] [libcxx] 3216428 - [libc++][test] Disable test coverage for `_BitInt` for non-libc++ implementations (#212435)
via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jul 28 04:35:04 PDT 2026
Author: A. Jiang
Date: 2026-07-28T19:35:00+08:00
New Revision: 321642826552ff4e4c7d67ea236f8669d4598c9f
URL: https://github.com/llvm/llvm-project/commit/321642826552ff4e4c7d67ea236f8669d4598c9f
DIFF: https://github.com/llvm/llvm-project/commit/321642826552ff4e4c7d67ea236f8669d4598c9f.diff
LOG: [libc++][test] Disable test coverage for `_BitInt` for non-libc++ implementations (#212435)
Currently, library support for `_BitInt(N)` is an extension explicitly
supported by libc++. However, when using Clang with other standard
library implementations, `TEST_HAS_BITINT` is currently `1` as the
condition only detects compiler support of `_BitInt`.
This patch disables `_BitInt` coverage for other implementations for
now.
Added:
Modified:
libcxx/test/support/test_macros.h
Removed:
################################################################################
diff --git a/libcxx/test/support/test_macros.h b/libcxx/test/support/test_macros.h
index 78b1f6eda6576..971dd8ee34230 100644
--- a/libcxx/test/support/test_macros.h
+++ b/libcxx/test/support/test_macros.h
@@ -45,7 +45,9 @@
// _BitInt(N) is a C23 standard feature and a Clang extension in earlier C and C++.
// __BITINT_MAXWIDTH__ is the portable probe: defined by every compiler that accepts _BitInt.
// Note __has_extension(bit_int) is unusable because it is not recognized by Clang and produces 0.
-#ifdef __BITINT_MAXWIDTH__
+// Currently, library support for _BitInt(N) is an extension explicitly supported by libc++,
+// and test coverage is disabled for other implementations.
+#if defined(__BITINT_MAXWIDTH__) && defined(_LIBCPP_VERSION)
# define TEST_HAS_BITINT 1
#else
# define TEST_HAS_BITINT 0
More information about the libcxx-commits
mailing list