[PATCH] D42755: [libcxx] Fix last_write_time tests for filesystems that don't support very small times.

Eric Fiselier via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 13 17:05:53 PST 2018


EricWF added a comment.

LGTM except the removal of the test. I think it's probably valuable to keep around on platforms that allow it.

What do you think?



================
Comment at: libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp:360
-
-    ec = GetTestEC();
-    last_write_time(p, Clock::now());
----------------
I would really love to keep this test. I think it has the ability to detect incorrect integer arithmetic in `last_write_time` when UBSAN is enabled.

Could we maybe add another check like `SupportsAlmostMinTime` where that checks `::min() + MicroSec(1)`?


https://reviews.llvm.org/D42755





More information about the cfe-commits mailing list