This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] [test] Use string().c_str() to convert a std::filesystem::path to a const char*
ClosedPublic

Authored by mstorsjo on Feb 25 2021, 3:21 AM.

Details

Summary

On Windows, path::value_type is wchar_t, so one can't pass the return value of path::c_str() directly to std::remove().

This matches what was done for tests under std/input.output/filesystems in 81db3c31aafec72f1cfec2a9da4381ece7f97a29 and 3784bdf2176f38cc30134fab776efb43506c0c54.

Diff Detail

Event Timeline

mstorsjo requested review of this revision.Feb 25 2021, 3:21 AM
mstorsjo created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 25 2021, 3:21 AM
Herald added 1 blocking reviewer(s): Restricted Project. · View Herald Transcript
curdeius accepted this revision.Feb 25 2021, 7:18 AM
curdeius added a subscriber: curdeius.

LGTM.

ldionne accepted this revision.Feb 25 2021, 9:05 AM
This revision is now accepted and ready to land.Feb 25 2021, 9:05 AM