From 5c40c994c329aa7e521c53cbc893426c90203941 Mon Sep 17 00:00:00 2001 From: Arthur O'Dwyer Date: Sun, 18 Apr 2021 21:47:08 -0400 Subject: [PATCH] [libc++] s/_LIBCPP_NO_HAS_CHAR8_T/_LIBCPP_HAS_NO_CHAR8_T/g This was raised in D94511. Differential Revision: https://reviews.llvm.org/D100736 --- libcxx/include/__config | 4 ++-- libcxx/include/__locale | 6 +++--- libcxx/include/__string | 4 ++-- libcxx/include/atomic | 8 ++++---- libcxx/include/cstddef | 2 +- libcxx/include/filesystem | 18 +++++++++--------- libcxx/include/iosfwd | 4 ++-- libcxx/include/string | 6 +++--- libcxx/include/string_view | 6 +++--- libcxx/include/utility | 6 +++--- libcxx/include/version | 2 +- libcxx/src/locale.cpp | 14 +++++++------- .../format.parse.ctx/advance_to.pass.cpp | 2 +- .../format.parse.ctx/begin.pass.cpp | 2 +- .../format.parse.ctx/ctor.pass.cpp | 2 +- .../format.parse.ctx/end.pass.cpp | 2 +- .../format.parse.ctx/types.compile.pass.cpp | 2 +- .../utility/utility.intcmp/intcmp.fail.cpp | 12 +++++++----- .../test.support/make_string_header.pass.cpp | 2 +- .../generate_feature_test_macro_components.py | 2 +- 20 files changed, 54 insertions(+), 52 deletions(-) diff --git a/libcxx/include/__config b/libcxx/include/__config index b0de01e9644b58..f69df513783964 100644 --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -976,7 +976,7 @@ typedef unsigned int char32_t; #endif #if _LIBCPP_STD_VER <= 17 || !defined(__cpp_char8_t) -#define _LIBCPP_NO_HAS_CHAR8_T +#define _LIBCPP_HAS_NO_CHAR8_T #endif // Deprecation macros. @@ -1019,7 +1019,7 @@ typedef unsigned int char32_t; # define _LIBCPP_DEPRECATED_IN_CXX20 #endif -#if !defined(_LIBCPP_NO_HAS_CHAR8_T) +#if !defined(_LIBCPP_HAS_NO_CHAR8_T) # define _LIBCPP_DEPRECATED_WITH_CHAR8_T _LIBCPP_DEPRECATED #else # define _LIBCPP_DEPRECATED_WITH_CHAR8_T diff --git a/libcxx/include/__locale b/libcxx/include/__locale index 595d8d934a73fb..20249a18cb6375 100644 --- a/libcxx/include/__locale +++ b/libcxx/include/__locale @@ -1161,7 +1161,7 @@ protected: virtual int do_max_length() const _NOEXCEPT; }; -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T // template <> class codecvt // C++20 @@ -1337,7 +1337,7 @@ protected: virtual int do_max_length() const _NOEXCEPT; }; -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T // template <> class codecvt // C++20 @@ -1455,7 +1455,7 @@ _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VI _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname) _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname) // deprecated in C++20 _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname) // deprecated in C++20 -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname) // C++20 _LIBCPP_EXTERN_TEMPLATE_EVEN_IN_DEBUG_MODE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname) // C++20 #endif diff --git a/libcxx/include/__string b/libcxx/include/__string index a9582770971776..a00c73623c4f33 100644 --- a/libcxx/include/__string +++ b/libcxx/include/__string @@ -538,7 +538,7 @@ char_traits::find(const char_type* __s, size_t __n, const char_type& __ } -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T template <> struct _LIBCPP_TEMPLATE_VIS char_traits @@ -645,7 +645,7 @@ char_traits::find(const char_type* __s, size_t __n, const char_type& __ return nullptr; } -#endif // #_LIBCPP_NO_HAS_CHAR8_T +#endif // #_LIBCPP_HAS_NO_CHAR8_T #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/include/atomic b/libcxx/include/atomic index eaff5368e02058..5ab10da5ffc7e3 100644 --- a/libcxx/include/atomic +++ b/libcxx/include/atomic @@ -1127,7 +1127,7 @@ _Tp kill_dependency(_Tp __y) _NOEXCEPT #if defined(__CLANG_ATOMIC_BOOL_LOCK_FREE) # define ATOMIC_BOOL_LOCK_FREE __CLANG_ATOMIC_BOOL_LOCK_FREE # define ATOMIC_CHAR_LOCK_FREE __CLANG_ATOMIC_CHAR_LOCK_FREE -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T # define ATOMIC_CHAR8_T_LOCK_FREE __CLANG_ATOMIC_CHAR8_T_LOCK_FREE #endif # define ATOMIC_CHAR16_T_LOCK_FREE __CLANG_ATOMIC_CHAR16_T_LOCK_FREE @@ -1141,7 +1141,7 @@ _Tp kill_dependency(_Tp __y) _NOEXCEPT #elif defined(__GCC_ATOMIC_BOOL_LOCK_FREE) # define ATOMIC_BOOL_LOCK_FREE __GCC_ATOMIC_BOOL_LOCK_FREE # define ATOMIC_CHAR_LOCK_FREE __GCC_ATOMIC_CHAR_LOCK_FREE -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T # define ATOMIC_CHAR8_T_LOCK_FREE __GCC_ATOMIC_CHAR8_T_LOCK_FREE #endif # define ATOMIC_CHAR16_T_LOCK_FREE __GCC_ATOMIC_CHAR16_T_LOCK_FREE @@ -1458,7 +1458,7 @@ template<> struct __cxx_is_always_lock_free { enum { __value = 2 == ATOMIC template<> struct __cxx_is_always_lock_free { enum { __value = 2 == ATOMIC_CHAR_LOCK_FREE }; }; template<> struct __cxx_is_always_lock_free { enum { __value = 2 == ATOMIC_CHAR_LOCK_FREE }; }; template<> struct __cxx_is_always_lock_free { enum { __value = 2 == ATOMIC_CHAR_LOCK_FREE }; }; -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T template<> struct __cxx_is_always_lock_free { enum { __value = 2 == ATOMIC_CHAR8_T_LOCK_FREE }; }; #endif template<> struct __cxx_is_always_lock_free { enum { __value = 2 == ATOMIC_CHAR16_T_LOCK_FREE }; }; @@ -2728,7 +2728,7 @@ typedef atomic atomic_long; typedef atomic atomic_ulong; typedef atomic atomic_llong; typedef atomic atomic_ullong; -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T typedef atomic atomic_char8_t; #endif typedef atomic atomic_char16_t; diff --git a/libcxx/include/cstddef b/libcxx/include/cstddef index bc0033012c60be..0d7abcf22cef81 100644 --- a/libcxx/include/cstddef +++ b/libcxx/include/cstddef @@ -59,7 +59,7 @@ template <> struct __libcpp_is_integral { enum { va template <> struct __libcpp_is_integral { enum { value = 1 }; }; template <> struct __libcpp_is_integral { enum { value = 1 }; }; template <> struct __libcpp_is_integral { enum { value = 1 }; }; -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T template <> struct __libcpp_is_integral { enum { value = 1 }; }; #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/include/filesystem b/libcxx/include/filesystem index fcfc63798b3026..3caaca0a3ef8f9 100644 --- a/libcxx/include/filesystem +++ b/libcxx/include/filesystem @@ -558,7 +558,7 @@ struct __can_convert_char { static const bool value = true; using __char_type = wchar_t; }; -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T template <> struct __can_convert_char { static const bool value = true; @@ -586,7 +586,7 @@ __is_separator(_ECharT __e) { #endif } -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T typedef u8string __u8_string; #else typedef string __u8_string; @@ -893,7 +893,7 @@ struct _PathExport { } }; -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T template <> struct _PathExport { typedef __narrow_to_utf8 _Narrower; @@ -903,7 +903,7 @@ struct _PathExport { _Narrower()(back_inserter(__dest), __src.data(), __src.data() + __src.size()); } }; -#endif /* !_LIBCPP_NO_HAS_CHAR8_T */ +#endif /* !_LIBCPP_HAS_NO_CHAR8_T */ #endif /* _LIBCPP_WIN32API */ class _LIBCPP_TYPE_VIS path { @@ -1264,7 +1264,7 @@ public: #else /* _LIBCPP_WIN32API */ _LIBCPP_INLINE_VISIBILITY _VSTD::string string() const { return __pn_; } -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T _LIBCPP_INLINE_VISIBILITY _VSTD::u8string u8string() const { return _VSTD::u8string(__pn_.begin(), __pn_.end()); } #else _LIBCPP_INLINE_VISIBILITY _VSTD::string u8string() const { return __pn_; } @@ -1296,7 +1296,7 @@ public: // generic format observers _VSTD::string generic_string() const { return __pn_; } -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T _VSTD::u8string generic_u8string() const { return _VSTD::u8string(__pn_.begin(), __pn_.end()); } #else _VSTD::string generic_u8string() const { return __pn_; } @@ -1520,7 +1520,7 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_WITH_CHAR8_T typename enable_if<__is_pathable<_InputIt>::value, path>::type u8path(_InputIt __f, _InputIt __l) { static_assert( -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T is_same::__char_type, char8_t>::value || #endif is_same::__char_type, char>::value, @@ -1544,7 +1544,7 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_WITH_CHAR8_T typename enable_if<__is_pathable<_InputIt>::value, path>::type u8path(_InputIt __f, _NullSentinel) { static_assert( -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T is_same::__char_type, char8_t>::value || #endif is_same::__char_type, char>::value, @@ -1567,7 +1567,7 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_WITH_CHAR8_T typename enable_if<__is_pathable<_Source>::value, path>::type u8path(const _Source& __s) { static_assert( -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T is_same::__char_type, char8_t>::value || #endif is_same::__char_type, char>::value, diff --git a/libcxx/include/iosfwd b/libcxx/include/iosfwd index 7b44d6e5f465d3..499839f7d04d1e 100644 --- a/libcxx/include/iosfwd +++ b/libcxx/include/iosfwd @@ -107,7 +107,7 @@ class _LIBCPP_TYPE_VIS ios_base; template struct _LIBCPP_TEMPLATE_VIS char_traits; template<> struct char_traits; -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T template<> struct char_traits; #endif template<> struct char_traits; @@ -221,7 +221,7 @@ template template class _LIBCPP_TEMPLATE_VIS fpos; typedef fpos streampos; typedef fpos wstreampos; -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T typedef fpos u8streampos; #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/include/string b/libcxx/include/string index d8d81060577669..bf3b64c0de9274 100644 --- a/libcxx/include/string +++ b/libcxx/include/string @@ -677,7 +677,7 @@ struct __padding<_CharT, 1> #endif // _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T typedef basic_string u8string; #endif @@ -689,7 +689,7 @@ typedef basic_string u32string; template class _LIBCPP_TEMPLATE_VIS -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T _LIBCPP_PREFERRED_NAME(u8string) #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS @@ -4540,7 +4540,7 @@ inline namespace literals return basic_string (__str, __len); } -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T inline _LIBCPP_INLINE_VISIBILITY basic_string operator "" s(const char8_t *__str, size_t __len) _NOEXCEPT { diff --git a/libcxx/include/string_view b/libcxx/include/string_view index e957a649f62ddf..dc64ec6b1fd70b 100644 --- a/libcxx/include/string_view +++ b/libcxx/include/string_view @@ -207,7 +207,7 @@ template > class _LIBCPP_TEMPLATE_VIS basic_string_view; typedef basic_string_view string_view; -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T typedef basic_string_view u8string_view; #endif typedef basic_string_view u16string_view; @@ -217,7 +217,7 @@ typedef basic_string_view wstring_view; template class _LIBCPP_PREFERRED_NAME(string_view) -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T _LIBCPP_PREFERRED_NAME(u8string_view) #endif _LIBCPP_PREFERRED_NAME(u16string_view) @@ -854,7 +854,7 @@ inline namespace literals return basic_string_view (__str, __len); } -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR basic_string_view operator "" sv(const char8_t *__str, size_t __len) _NOEXCEPT { diff --git a/libcxx/include/utility b/libcxx/include/utility index ba4e216750378d..b494723fa40a90 100644 --- a/libcxx/include/utility +++ b/libcxx/include/utility @@ -303,7 +303,7 @@ struct _IsSameAsAny : _Or<_IsSame<_Tp, _Up>...> {}; template concept __is_safe_integral_cmp = is_integral_v<_Tp> && !_IsSameAsAny<_Tp, bool, char, -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T char8_t, #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS @@ -1460,7 +1460,7 @@ struct _LIBCPP_TEMPLATE_VIS hash size_t operator()(unsigned char __v) const _NOEXCEPT {return static_cast(__v);} }; -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T template <> struct _LIBCPP_TEMPLATE_VIS hash : public unary_function @@ -1468,7 +1468,7 @@ struct _LIBCPP_TEMPLATE_VIS hash _LIBCPP_INLINE_VISIBILITY size_t operator()(char8_t __v) const _NOEXCEPT {return static_cast(__v);} }; -#endif // !_LIBCPP_NO_HAS_CHAR8_T +#endif // !_LIBCPP_HAS_NO_CHAR8_T #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/include/version b/libcxx/include/version index 440fc5942bb250..fb5eb6ec2586b8 100644 --- a/libcxx/include/version +++ b/libcxx/include/version @@ -295,7 +295,7 @@ __cpp_lib_void_t 201411L // # define __cpp_lib_bit_cast 201806L // # define __cpp_lib_bitops 201907L # define __cpp_lib_bounded_array_traits 201902L -# if !defined(_LIBCPP_NO_HAS_CHAR8_T) +# if !defined(_LIBCPP_HAS_NO_CHAR8_T) # define __cpp_lib_char8_t 201811L # endif # define __cpp_lib_concepts 202002L diff --git a/libcxx/src/locale.cpp b/libcxx/src/locale.cpp index 634ae6f373dba6..bb28e1ff498e4f 100644 --- a/libcxx/src/locale.cpp +++ b/libcxx/src/locale.cpp @@ -206,7 +206,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_PUSH install(&make >(1u)); install(&make >(1u)); _LIBCPP_SUPPRESS_DEPRECATED_POP -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T install(&make >(1u)); install(&make >(1u)); #endif @@ -255,7 +255,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_PUSH install(new codecvt_byname(name_)); install(new codecvt_byname(name_)); _LIBCPP_SUPPRESS_DEPRECATED_POP -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T install(new codecvt_byname(name_)); install(new codecvt_byname(name_)); #endif @@ -331,7 +331,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_PUSH install(new codecvt_byname(name)); install(new codecvt_byname(name)); _LIBCPP_SUPPRESS_DEPRECATED_POP -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T install(new codecvt_byname(name)); install(new codecvt_byname(name)); #endif @@ -407,7 +407,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_PUSH install_from<_VSTD::codecvt >(one); install_from<_VSTD::codecvt >(one); _LIBCPP_SUPPRESS_DEPRECATED_POP -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T install_from<_VSTD::codecvt >(one); install_from<_VSTD::codecvt >(one); #endif @@ -3195,7 +3195,7 @@ codecvt::do_max_length() const noexcept return 4; } -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T // template <> class codecvt @@ -3353,7 +3353,7 @@ codecvt::do_max_length() const noexcept return 4; } -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T // template <> class codecvt @@ -6336,7 +6336,7 @@ template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname; template class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname; template class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname; -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname; template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname; #endif diff --git a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/advance_to.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/advance_to.pass.cpp index c91d1b8f625c21..324b9c7397454f 100644 --- a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/advance_to.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/advance_to.pass.cpp @@ -49,7 +49,7 @@ constexpr void test(const CharT* fmt) { constexpr bool test() { test("abc"); test(L"abc"); -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T test(u8"abc"); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/begin.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/begin.pass.cpp index b08129b7514025..b462f9b52491a4 100644 --- a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/begin.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/begin.pass.cpp @@ -35,7 +35,7 @@ constexpr void test(const CharT* fmt) { constexpr bool test() { test("abc"); test(L"abc"); -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T test(u8"abc"); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/ctor.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/ctor.pass.cpp index 5a4a0466fb2302..0df74aa8ccfb75 100644 --- a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/ctor.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/ctor.pass.cpp @@ -58,7 +58,7 @@ constexpr void test(const CharT* fmt) { constexpr bool test() { test("abc"); test(L"abc"); -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T test(u8"abc"); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/end.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/end.pass.cpp index 323939a53e1fd3..d493f9245054ba 100644 --- a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/end.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/end.pass.cpp @@ -35,7 +35,7 @@ constexpr void test(const CharT* fmt) { constexpr bool test() { test("abc"); test(L"abc"); -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T test(u8"abc"); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/types.compile.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/types.compile.pass.cpp index c9301c5bc89232..df05f55aa7a5d7 100644 --- a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/types.compile.pass.cpp +++ b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/types.compile.pass.cpp @@ -45,7 +45,7 @@ constexpr void test() { constexpr void test() { test(); test(); -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T test(); #endif #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS diff --git a/libcxx/test/std/utilities/utility/utility.intcmp/intcmp.fail.cpp b/libcxx/test/std/utilities/utility/utility.intcmp/intcmp.fail.cpp index bd436dd23ea089..0099504e2b65aa 100644 --- a/libcxx/test/std/utilities/utility/utility.intcmp/intcmp.fail.cpp +++ b/libcxx/test/std/utilities/utility/utility.intcmp/intcmp.fail.cpp @@ -71,7 +71,7 @@ constexpr void test() { std::in_range(int()); // expected-error11{{no matching function for call to 'in_range'}} std::in_range(T()); // expected-error11{{no matching function for call to 'in_range'}} } -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T template constexpr void test_char8t() { std::cmp_equal(T(), T()); // expected-error1{{no matching function for call to 'cmp_equal'}} @@ -95,7 +95,7 @@ constexpr void test_char8t() { std::in_range(int()); // expected-error1{{no matching function for call to 'in_range'}} std::in_range(T()); // expected-error1{{no matching function for call to 'in_range'}} } -#endif // _LIBCPP_NO_HAS_CHAR8_T +#endif // _LIBCPP_HAS_NO_CHAR8_T #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS template @@ -135,13 +135,15 @@ int main() { test(); test(); test(); -#ifndef _LIBCPP_NO_HAS_CHAR8_T + +#ifndef _LIBCPP_HAS_NO_CHAR8_T test_char8t(); -#endif // !_LIBCPP_NO_HAS_CHAR8_T +#endif // _LIBCPP_HAS_NO_CHAR8_T #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS test_uchars(); test_uchars(); -#endif // !_LIBCPP_HAS_NO_UNICODE_CHARS +#endif // _LIBCPP_HAS_NO_UNICODE_CHARS + return 0; } diff --git a/libcxx/test/support/test.support/make_string_header.pass.cpp b/libcxx/test/support/test.support/make_string_header.pass.cpp index 0d1685409abb48..c35cc5237037eb 100644 --- a/libcxx/test/support/test.support/make_string_header.pass.cpp +++ b/libcxx/test/support/test.support/make_string_header.pass.cpp @@ -28,7 +28,7 @@ int main(int, char**) { "OPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~") == L" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN" "OPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~"); -#ifndef _LIBCPP_NO_HAS_CHAR8_T +#ifndef _LIBCPP_HAS_NO_CHAR8_T assert(MAKE_STRING(char8_t, " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN" "OPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~") diff --git a/libcxx/utils/generate_feature_test_macro_components.py b/libcxx/utils/generate_feature_test_macro_components.py index 978430c852de2a..36fe3b35dfaf12 100755 --- a/libcxx/utils/generate_feature_test_macro_components.py +++ b/libcxx/utils/generate_feature_test_macro_components.py @@ -187,7 +187,7 @@ def add_version_header(tc): "values": { "c++20": 201811 }, "headers": ["atomic", "filesystem", "istream", "limits", "locale", "ostream", "string", "string_view"], "test_suite_guard": "defined(__cpp_char8_t)", - "libcxx_guard": "!defined(_LIBCPP_NO_HAS_CHAR8_T)", + "libcxx_guard": "!defined(_LIBCPP_HAS_NO_CHAR8_T)", }, { "name": "__cpp_lib_chrono", "values": { "c++17": 201611 },