From 5935db6ebda9d931f9b37db30f8a51bd577ba9dd Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Mon, 28 Nov 2022 11:49:23 -0500 Subject: [PATCH] [libc++] Fix incorrect guard against the presence of wide characters TEST_HAS_NO_WIDE_CHARACTERS should only be used in the tests. Differential Revision: https://reviews.llvm.org/D138828 --- libcxx/include/__format/unicode.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libcxx/include/__format/unicode.h b/libcxx/include/__format/unicode.h index 50f66e7..fdcaff8 100644 --- a/libcxx/include/__format/unicode.h +++ b/libcxx/include/__format/unicode.h @@ -210,7 +210,7 @@ private: const char* __last_; }; -# ifndef TEST_HAS_NO_WIDE_CHARACTERS +# ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS _LIBCPP_HIDE_FROM_ABI constexpr bool __is_surrogate_pair_high(wchar_t __value) { return __value >= 0xd800 && __value <= 0xdbff; } @@ -294,7 +294,7 @@ private: const wchar_t* __first_; const wchar_t* __last_; }; -# endif +# endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS _LIBCPP_HIDE_FROM_ABI constexpr bool __at_extended_grapheme_cluster_break( bool& __ri_break_allowed, -- 2.7.4