Details
- Reviewers
amccarth EricWF ldionne rnk - Group Reviewers
Restricted Project - Commits
- rG592d62352933: [libcxx] Implement _FilesystemClock::now() and __last_write_time for windows
Diff Detail
Event Timeline
This looks good. I'm just confused by one point and have a small suggested edit.
libcxx/src/filesystem/operations.cpp | ||
---|---|---|
397–398 | Just a suggestion to give those magic values some context. | |
1134 | It's not clear to me why this checks new_time == file_time_type::min(). It looks like convert_to_timespec returns false if the new time is not representable. In what case would new_time be min? And why would we then say the value is too large? |
libcxx/src/filesystem/operations.cpp | ||
---|---|---|
397–398 | Good point, will apply that. | |
1134 | This is mostly a workaround to get this test working, when the filesystem time type isn't int128_t: https://github.com/llvm/llvm-project/blob/master/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp#L507-L540 But that test also relies on the test being able to guess what time values are reprepsentable and what aren't, and that doesn't really match what the implementation does anyway, so I guess I could just skip that testcase for now as well, and remove this odd hack here. And saying the value is "too large" mostly means "out of range" I guess. |
Just a suggestion to give those magic values some context.