Skip to content

Conversation

mstorsjo
Copy link
Member

@mstorsjo mstorsjo commented Oct 3, 2025

Clang 20 (and early 21 versions; let's hope it can be fixed before the later versions before such versions become relevant for libcxx CI) have got an issue with its intrinsics headers, where they use unreserved names, that users are allowed to override.

See #161808 for the issue report.

This only crops up in the MSVC build configurations, as recent versions of some MSVC/UCRT headers include <intrin.h>, which ends up pulling in most intrinsics headers, exposing this issue in the Clang headers.

This should unblock #161736 from being merged.

… msvc

Clang 20 (and early 21 versions; let's hope it can be fixed
before the later versions before such versions become relevant
for libcxx CI) have got an issue with its intrinsics headers,
where they use unreserved names, that users are allowed to override.

See llvm#161808 for the
issue report.

This only crops up in the MSVC build configurations, as recent
versions of some MSVC/UCRT headers include `<intrin.h>`, which
ends up pulling in most intrinsics headers, exposing this issue
in the Clang headers.

This should unblock llvm#161736
from being merged.
@mstorsjo mstorsjo requested a review from philnik777 October 3, 2025 09:17
@mstorsjo mstorsjo requested a review from a team as a code owner October 3, 2025 09:17
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Oct 3, 2025
@llvmbot
Copy link
Member

llvmbot commented Oct 3, 2025

@llvm/pr-subscribers-libcxx

Author: Martin Storsjö (mstorsjo)

Changes

Clang 20 (and early 21 versions; let's hope it can be fixed before the later versions before such versions become relevant for libcxx CI) have got an issue with its intrinsics headers, where they use unreserved names, that users are allowed to override.

See #161808 for the issue report.

This only crops up in the MSVC build configurations, as recent versions of some MSVC/UCRT headers include &lt;intrin.h&gt;, which ends up pulling in most intrinsics headers, exposing this issue in the Clang headers.

This should unblock #161736 from being merged.


Full diff: https://github.com/llvm/llvm-project/pull/161811.diff

1 Files Affected:

  • (modified) libcxx/test/libcxx/system_reserved_names.gen.py (+7)
diff --git a/libcxx/test/libcxx/system_reserved_names.gen.py b/libcxx/test/libcxx/system_reserved_names.gen.py
index f8589f2beaae3..d69182d68e0de 100644
--- a/libcxx/test/libcxx/system_reserved_names.gen.py
+++ b/libcxx/test/libcxx/system_reserved_names.gen.py
@@ -10,6 +10,13 @@
 # alphabetic macros. Also ensure that we don't swallow the definition of user
 # provided macros (in other words, ensure that we push/pop correctly everywhere).
 
+# This test fails with MSVC headers, with Clang 20 (and early 21 versions);
+# the headers end up pulling in Clang intrinsics headers, which in 20.x and
+# early 21.x versions use unreserved identifiers,
+# see https://github.com/llvm/llvm-project/issues/161808.
+#
+# UNSUPPORTED: clang-20 && msvc
+
 # RUN: %{python} %s %{libcxx-dir}/utils
 # END.
 

@mstorsjo mstorsjo merged commit 5d3b3ea into llvm:main Oct 3, 2025
71 of 80 checks passed
@mstorsjo mstorsjo deleted the libcxx-test-skip-reserved-names-clang-cl branch October 3, 2025 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants