Skip to content

Commit 184dbc0

Browse files
committed
[libc++] Fix disabling of extension warnings in C++20 and later
1 parent df0ccf6 commit 184dbc0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libcxx/include/__config

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -543,9 +543,9 @@ typedef __char32_t char32_t;
543543
# endif
544544

545545
// Clang modules take a significant compile time hit when pushing and popping diagnostics.
546-
// Since all the headers are marked as system headers in the modulemap, we can simply disable this
547-
// pushing and popping when building with clang modules.
548-
# if !__has_feature(modules)
546+
// Since all the headers are marked as system headers unless _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER is defined, we can
547+
// simply disable this pushing and popping when _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER isn't defined.
548+
# ifdef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
549549
# define _LIBCPP_PUSH_EXTENSION_DIAGNOSTICS \
550550
_LIBCPP_DIAGNOSTIC_PUSH \
551551
_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wc++11-extensions") \

0 commit comments

Comments
 (0)