mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 16:56:06 +00:00

This PR carves out small portion of the test in subject to avoid the following failure when unicode is not available. ``` # | Assertion failure: result == expected .../formatter.char.funsigned-char.pass.cpp 56 # | # | Format string ?} # | Expected output '\x{80}' # | Actual output '�' ``` This was traced down to different definition of `__code_point_view::__consume()` under macro_LIBCXX_HAS_NO_UNICODE which is called inside `__formatter::__escape()`. The `__consume()` returns `__ok` and code assumes that escaped sequence was already written but it is not., thus the failure. Here is the snippen code we fall into: ``` typename __unicode::__consume_result __result = __view.__consume(); if (__result.__status == __unicode::__consume_result::__ok) { __escape = __formatter::__is_escaped_sequence_written(__str, __result.__code_point, __escape, __mark); ```