@@ -406,10 +406,6 @@ _LIBCPP_HARDENING_MODE_DEBUG
406
406
# define __has_include (...) 0
407
407
# endif
408
408
409
- # ifndef __has_warning
410
- # define __has_warning (...) 0
411
- # endif
412
-
413
409
# if !defined(_LIBCPP_COMPILER_CLANG_BASED) && __cplusplus < 201103L
414
410
# error "libc++ only supports C++03 with Clang-based compilers. Please enable C++11"
415
411
# endif
@@ -727,23 +723,6 @@ typedef __char32_t char32_t;
727
723
# define _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION _LIBCPP_ALWAYS_INLINE
728
724
# endif
729
725
730
- # ifdef _LIBCPP_COMPILER_CLANG_BASED
731
- # define _LIBCPP_DIAGNOSTIC_PUSH _Pragma (" clang diagnostic push" )
732
- # define _LIBCPP_DIAGNOSTIC_POP _Pragma (" clang diagnostic pop" )
733
- # define _LIBCPP_CLANG_DIAGNOSTIC_IGNORED (str ) _Pragma (_LIBCPP_TOSTRING(clang diagnostic ignored str))
734
- # define _LIBCPP_GCC_DIAGNOSTIC_IGNORED (str )
735
- # elif defined(_LIBCPP_COMPILER_GCC)
736
- # define _LIBCPP_DIAGNOSTIC_PUSH _Pragma (" GCC diagnostic push" )
737
- # define _LIBCPP_DIAGNOSTIC_POP _Pragma (" GCC diagnostic pop" )
738
- # define _LIBCPP_CLANG_DIAGNOSTIC_IGNORED (str )
739
- # define _LIBCPP_GCC_DIAGNOSTIC_IGNORED (str ) _Pragma (_LIBCPP_TOSTRING(GCC diagnostic ignored str))
740
- # else
741
- # define _LIBCPP_DIAGNOSTIC_PUSH
742
- # define _LIBCPP_DIAGNOSTIC_POP
743
- # define _LIBCPP_CLANG_DIAGNOSTIC_IGNORED (str )
744
- # define _LIBCPP_GCC_DIAGNOSTIC_IGNORED (str )
745
- # endif
746
-
747
726
# if _LIBCPP_HARDENING_MODE == _LIBCPP_HARDENING_MODE_FAST
748
727
# define _LIBCPP_HARDENING_SIG f
749
728
# elif _LIBCPP_HARDENING_MODE == _LIBCPP_HARDENING_MODE_EXTENSIVE
@@ -831,33 +810,16 @@ typedef __char32_t char32_t;
831
810
# define _LIBCPP_HIDE_FROM_ABI_AFTER_V1 _LIBCPP_HIDE_FROM_ABI
832
811
# endif
833
812
834
- // TODO: Remove this workaround once we drop support for Clang 16
835
- #if __has_warning("-Wc++23-extensions")
836
- # define _LIBCPP_CLANG_DIAGNOSTIC_IGNORED_CXX23_EXTENSION _LIBCPP_CLANG_DIAGNOSTIC_IGNORED (" -Wc++23-extensions" )
837
- #else
838
- # define _LIBCPP_CLANG_DIAGNOSTIC_IGNORED_CXX23_EXTENSION _LIBCPP_CLANG_DIAGNOSTIC_IGNORED (" -Wc++2b-extensions" )
839
- #endif
840
-
841
813
// Inline namespaces are available in Clang/GCC/MSVC regardless of C++ dialect.
842
814
// clang-format off
843
- # define _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_DIAGNOSTIC_PUSH \
844
- _LIBCPP_CLANG_DIAGNOSTIC_IGNORED (" -Wc++11-extensions" ) \
845
- _LIBCPP_CLANG_DIAGNOSTIC_IGNORED(" -Wc++14-extensions" ) \
846
- _LIBCPP_CLANG_DIAGNOSTIC_IGNORED(" -Wc++17-extensions" ) \
847
- _LIBCPP_CLANG_DIAGNOSTIC_IGNORED(" -Wc++20-extensions" ) \
848
- _LIBCPP_CLANG_DIAGNOSTIC_IGNORED_CXX23_EXTENSION \
849
- _LIBCPP_GCC_DIAGNOSTIC_IGNORED(" -Wc++14-extensions" ) \
850
- _LIBCPP_GCC_DIAGNOSTIC_IGNORED(" -Wc++17-extensions" ) \
851
- _LIBCPP_GCC_DIAGNOSTIC_IGNORED(" -Wc++20-extensions" ) \
852
- _LIBCPP_GCC_DIAGNOSTIC_IGNORED(" -Wc++23-extensions" ) \
853
- namespace _LIBCPP_TYPE_VISIBILITY_DEFAULT std { \
815
+ # define _LIBCPP_BEGIN_NAMESPACE_STD namespace _LIBCPP_TYPE_VISIBILITY_DEFAULT std { \
854
816
inline namespace _LIBCPP_ABI_NAMESPACE {
855
- # define _LIBCPP_END_NAMESPACE_STD }} _LIBCPP_DIAGNOSTIC_POP
817
+ # define _LIBCPP_END_NAMESPACE_STD }}
856
818
857
819
# define _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM _LIBCPP_BEGIN_NAMESPACE_STD \
858
820
inline namespace __fs { namespace filesystem {
859
821
860
- # define _LIBCPP_END_NAMESPACE_FILESYSTEM }} _LIBCPP_END_NAMESPACE_STD
822
+ # define _LIBCPP_END_NAMESPACE_FILESYSTEM _LIBCPP_END_NAMESPACE_STD }}
861
823
// clang-format on
862
824
863
825
# if __has_attribute(__enable_if__)
@@ -1294,6 +1256,23 @@ __sanitizer_verify_double_ended_contiguous_container(const void*, const void*, c
1294
1256
// the ABI inconsistent.
1295
1257
# endif
1296
1258
1259
+ # ifdef _LIBCPP_COMPILER_CLANG_BASED
1260
+ # define _LIBCPP_DIAGNOSTIC_PUSH _Pragma (" clang diagnostic push" )
1261
+ # define _LIBCPP_DIAGNOSTIC_POP _Pragma (" clang diagnostic pop" )
1262
+ # define _LIBCPP_CLANG_DIAGNOSTIC_IGNORED (str ) _Pragma (_LIBCPP_TOSTRING(clang diagnostic ignored str))
1263
+ # define _LIBCPP_GCC_DIAGNOSTIC_IGNORED (str )
1264
+ # elif defined(_LIBCPP_COMPILER_GCC)
1265
+ # define _LIBCPP_DIAGNOSTIC_PUSH _Pragma (" GCC diagnostic push" )
1266
+ # define _LIBCPP_DIAGNOSTIC_POP _Pragma (" GCC diagnostic pop" )
1267
+ # define _LIBCPP_CLANG_DIAGNOSTIC_IGNORED (str )
1268
+ # define _LIBCPP_GCC_DIAGNOSTIC_IGNORED (str ) _Pragma (_LIBCPP_TOSTRING(GCC diagnostic ignored str))
1269
+ # else
1270
+ # define _LIBCPP_DIAGNOSTIC_PUSH
1271
+ # define _LIBCPP_DIAGNOSTIC_POP
1272
+ # define _LIBCPP_CLANG_DIAGNOSTIC_IGNORED (str )
1273
+ # define _LIBCPP_GCC_DIAGNOSTIC_IGNORED (str )
1274
+ # endif
1275
+
1297
1276
// c8rtomb() and mbrtoc8() were added in C++20 and C23. Support for these
1298
1277
// functions is gradually being added to existing C libraries. The conditions
1299
1278
// below check for known C library versions and conditions under which these
0 commit comments