[libcxx-commits] [PATCH] D138828: [libc++] Fix incorrect guard against the presence of wide characters

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Nov 28 08:50:36 PST 2022


ldionne created this revision.
Herald added a project: All.
ldionne requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

TEST_HAS_NO_WIDE_CHARACTERS should only be used in the tests.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D138828

Files:
  libcxx/include/__format/unicode.h


Index: libcxx/include/__format/unicode.h
===================================================================
--- libcxx/include/__format/unicode.h
+++ libcxx/include/__format/unicode.h
@@ -210,7 +210,7 @@
   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 @@
   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,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138828.478260.patch
Type: text/x-patch
Size: 701 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20221128/18f25d9c/attachment-0001.bin>


More information about the libcxx-commits mailing list