Skip to content

Conversation

@cpplearner
Copy link
Contributor

@cpplearner cpplearner commented Jan 1, 2026

This adds Clang diagnostic suppressions as requested in #5975, and makes the module-related tests work with clang-cl.

Thanks to LLVM-98761 and LLVM-89772, clang-cl understands the Clang-style options needed to produce and consume Built Module Interfaces (BMIs). This is good enough for our test purposes.

I need to guard a line that calls source_location::column, because Clang and MSVC produce different values. This isn't specific to modules. The difference can also be found in the P1208R6_source_location test.

I also need to workaround a bug, where clang thinks the declaration of _alloca in <malloc.h> has conflicting ownership. This looks similar to LLVM-37969, though the trigger is different. I've added a repro to that issue. Note that the bug only affects ARM64/ARM64EC, because <intrin.h> is included in the global module fragment, which includes <malloc.h> on x64/x86.

Fixes #5975

@cpplearner cpplearner requested a review from a team as a code owner January 1, 2026 12:38
@github-project-automation github-project-automation bot moved this to Initial Review in STL Code Reviews Jan 1, 2026
@StephanTLavavej StephanTLavavej added the modules C++23 modules, C++20 header units label Jan 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

modules C++23 modules, C++20 header units

Projects

Status: Initial Review

Development

Successfully merging this pull request may close these issues.

Add a Clang-specific diagnostic ignore push-pop for module std;

2 participants