[libcxx-commits] [PATCH] D98640: [libcxx] [test] Fix windows errors in fs.op.rename
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Mar 16 04:33:01 PDT 2021
mstorsjo added inline comments.
================
Comment at: libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.rename/rename.pass.cpp:68
{dir, file}
+#endif
};
----------------
Quuxplusone wrote:
> (1) Please add a trailing comma on line 67.
> (2) I'd feel better if the comment were phrased in terms of the standard-specified behavior: is libc++'s current Win32 behavior conforming, or does libc++ actually need to go put a check inside `std::filesystem::rename` to deal with the moving-a-directory-onto-a-file situation because Win32 doesn't appropriately reject it? Can you find the chapter and verse that describes this behavior in the standard?
1. Done
2. Expanded the comment. As far as I can see from http://eel.is/c++draft/fs.op.rename, exactly which cases are treated as errors is left to be implementation/platform dependent, and the note explicitly calls out that renaming (an unspecified type of path object) over a non-directory is allowed to succeed and remove the non-directory (i.e. regular file).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98640/new/
https://reviews.llvm.org/D98640
More information about the libcxx-commits
mailing list