[libcxx-commits] [PATCH] D120796: [libcxx] Fix the locale `is` and `scan_is`/`scan_not` tests for Windows
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Mar 2 01:03:15 PST 2022
mstorsjo created this revision.
mstorsjo added reviewers: Mordante, Quuxplusone.
Herald added a project: All.
mstorsjo requested review of this revision.
Herald added a project: libc++.
Herald added a reviewer: libc++.
Define `_LIBCPP_CTYPE_MASK_IS_COMPOSITE_ALPHA` for Windows,
as the `alpha` / `_ALPHA` constant is a mask consisting of
multiple bits set, which avoids setting `alpha` whenver any
of the bits is set, in the `do_is` implementation.
On Windows, with the "C" locale, characters outside of ASCII are
interpreted according to the current system code page, which
can consider chars like e.g. 0xDA as an uppercase alphabetical
character.
Due to the differing classification of some characters, the
`scan_is` and `scan_not` tests are quite annoying to fix, thus just
ifdef out some of the tests for the "C" locale there - the code gets
tested with the more standard en_US.UTF-8 locale anyway.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D120796
Files:
libcxx/include/__locale
libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/is_1.pass.cpp
libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/is_many.pass.cpp
libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/scan_is.pass.cpp
libcxx/test/std/localization/locale.categories/category.ctype/locale.ctype.byname/scan_not.pass.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120796.412344.patch
Type: text/x-patch
Size: 8240 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220302/d4fc2b13/attachment-0001.bin>
More information about the libcxx-commits
mailing list