This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] [test] Don't look for the literal spelling __mbstate_t
ClosedPublic

Authored by mstorsjo on May 28 2021, 4:22 AM.

Details

Summary

While the code uses the type name std::mbstate_t, the warning message
mentions the original underlying type, which is a C library internal
type name.

On Windows this type is called _Mbstatet instead of __mbstate_t. Use
expect-warning-re to avoid spelling out the literal name of the type.

Due to issues with the detection of the clang-verify feature, these
tests have been skipped in the Windows CI configuration so far.

Diff Detail

Event Timeline

mstorsjo requested review of this revision.May 28 2021, 4:22 AM
mstorsjo created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptMay 28 2021, 4:22 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Mordante accepted this revision as: Mordante.May 29 2021, 1:42 AM
Mordante added a subscriber: Mordante.

LGTM, modulo the remark.

libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/codecvt_byname_char16_t_char.depr_in_cxx20.verify.cpp
23–25

I think it would be good to add some comment like "Don't test for the exact type since the underlying type of std::mbstate_t depends on implementation details."

ldionne accepted this revision.May 31 2021, 8:59 AM
This revision is now accepted and ready to land.May 31 2021, 8:59 AM