-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
modulesC++23 modules, C++20 header unitsC++23 modules, C++20 header units
Description
Lines 39 to 40 in cbe2ee9
| #pragma warning(push) | |
| #pragma warning(disable : 5244) // '#include <meow>' in the purview of module 'std' appears erroneous. |
It seems the MSVC STL module works with clang++.exe (this is the driver with the GNU-like command-line interface, but targets the MSVC ABI). However, the module needs to have additional guards for Clang so that the same warnings of having #include <angle> and defining module std are suppressed. The core of it is:
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winclude-angled-in-module-purview"
#pragma clang diagnostic ignored "-Wreserved-module-identifier"
#endif
...
#if defined(__clang__)
#pragma clang diagnostic pop
#endifBut I suspect we need to be much more judicious about the macro guards, because clang-cl.exe disguises itself as MSVC to source code, with the exception that __clang__ is also defined.
frederick-vs-ja, cpplearner and YexuanXiao
Metadata
Metadata
Assignees
Labels
modulesC++23 modules, C++20 header unitsC++23 modules, C++20 header units