[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
> (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?
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).
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the libcxx-commits