This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Keep char_traits<T> for arbitrary T around until LLVM 18
ClosedPublic

Authored by ldionne on Nov 23 2022, 11:10 AM.

Details

Summary

This is in response to failures seen after landing D138307.

Diff Detail

Event Timeline

ldionne created this revision.Nov 23 2022, 11:10 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 23 2022, 11:10 AM
ldionne requested review of this revision.Nov 23 2022, 11:10 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 23 2022, 11:10 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
gulfem added a subscriber: gulfem.Nov 23 2022, 12:09 PM
ldionne updated this revision to Diff 477579.Nov 23 2022, 12:14 PM

Fix more tests to address CI failures.

ldionne added inline comments.
libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
84–87

@Mordante Did you really mean to test std::format with a character type of int? Is that meaningful?

Note that I'll land this as soon as I get a green CI run to unbreak the downstreams that were impacted by D138307. We can make additional tweaks post-commit as needed.

ldionne accepted this revision.Nov 24 2022, 5:22 AM

Upon looking at the Bootstrapping build issue, I'm pretty sure it's not related to this patch. I'll land this now.

This revision is now accepted and ready to land.Nov 24 2022, 5:22 AM
This revision was landed with ongoing or failed builds.Nov 24 2022, 5:23 AM
This revision was automatically updated to reflect the committed changes.
Mordante added inline comments.Nov 25 2022, 9:13 AM
libcxx/test/std/utilities/format/format.formattable/concept.formattable.compile.pass.cpp
84–87

Yes that is intended. When you look at assert_is_formattable the only formattable CharT's are char and wchar_t. So char8_t, char16_t, char32_t and non character types like int are never formattable.

I agree with the change; I didn't noticed before since the basic_string and basic_string_view "worked" with ints. Thanks for the fix.