[libcxx-commits] [libcxx] [libc++][test] Disable test coverage for `_BitInt` for MSVC STL (PR #212435)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jul 28 02:03:36 PDT 2026


https://github.com/frederick-vs-ja created https://github.com/llvm/llvm-project/pull/212435

Currently, MSVC STL has no plan to support `_BitInt`. However, when using Clang with MSVC STL, `TEST_HAS_BITINT` is currently `1` as the condition only detects compiler support of `_BitInt`.

This patch disables `_BitInt` coverage for MSVC STL for now.

>From 9e1f1d99de0c704917551a29847c4714c1d1012f Mon Sep 17 00:00:00 2001
From: "A. Jiang" <de34 at live.cn>
Date: Tue, 28 Jul 2026 17:01:40 +0800
Subject: [PATCH] [libc++][test] Disable test coverage for `_BitInt` for MSVC
 STL

Currently, MSVC STL has no plan to support `_BitInt`. However, when
using Clang with MSVC STL, `TEST_HAS_BITINT` is currently `1` as the
condition only detects compiler support of `_BitInt`.

This patch disables `_BitInt` coverage for MSVC STL for now.
---
 libcxx/test/support/test_macros.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libcxx/test/support/test_macros.h b/libcxx/test/support/test_macros.h
index 78b1f6eda6576..d9bca7e018e2a 100644
--- a/libcxx/test/support/test_macros.h
+++ b/libcxx/test/support/test_macros.h
@@ -45,7 +45,8 @@
 // _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, MSVC STL has no plan to support _BitInt(N). So we should not enable test coverage for it.
+#if defined(__BITINT_MAXWIDTH__) && !defined(_MSVC_STL_VERSION)
 #  define TEST_HAS_BITINT 1
 #else
 #  define TEST_HAS_BITINT 0



More information about the libcxx-commits mailing list