[libcxx-commits] [libcxx] 5935db6 - [libc++] Fix incorrect guard against the presence of wide characters

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Mon Nov 28 14:34:15 PST 2022


Author: Louis Dionne
Date: 2022-11-28T14:33:49-08:00
New Revision: 5935db6ebda9d931f9b37db30f8a51bd577ba9dd

URL: https://github.com/llvm/llvm-project/commit/5935db6ebda9d931f9b37db30f8a51bd577ba9dd
DIFF: https://github.com/llvm/llvm-project/commit/5935db6ebda9d931f9b37db30f8a51bd577ba9dd.diff

LOG: [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

Added: 
    

Modified: 
    libcxx/include/__format/unicode.h

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__format/unicode.h b/libcxx/include/__format/unicode.h
index 50f66e72570bf..fdcaff840726a 100644
--- a/libcxx/include/__format/unicode.h
+++ b/libcxx/include/__format/unicode.h
@@ -210,7 +210,7 @@ class __code_point_view<char> {
   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 @@ class __code_point_view<wchar_t> {
   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,


        


More information about the libcxx-commits mailing list