[PATCH] D55746: [libcxx] [test] [re.traits] Correct expected values for invalid UTF-8

Marshall Clow via Phabricator reviews at reviews.llvm.org
Mon Dec 17 10:05:40 PST 2018


mclow.lists added a comment.

> In my opinion we shall not test UB as each implementation can probably behave in any way.

If you can convince me that this is in fact UB, then I would agree.
But I'm not seeing any indication that this is UB when reading the standard.

[locale.ctype.members]/5 says: that `tolower` calls `do_tolower`, which is defined thus:
Returns: The first form returns the corresponding lower-case character if it is known to exist, or its argument if not.

[ It's also possible that different implementations of the locales (part of the C library/OS) are returning different values. If that turns out to be the case, then we should document those differences and move on. ]


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55746/new/

https://reviews.llvm.org/D55746





More information about the libcxx-commits mailing list