Implement filesystem NB comments, relative paths, and related issues.
authorEric Fiselier <eric@efcs.ca>
Mon, 2 Apr 2018 23:03:41 +0000 (23:03 +0000)
committerEric Fiselier <eric@efcs.ca>
Mon, 2 Apr 2018 23:03:41 +0000 (23:03 +0000)
commitd7fae181c3954886257fb33d0a57b954b26da745
tree841df55a810bc7446cf7afdd6811b3f1d79a3fc8
parent298ffc609bf5c67079dbeb77e3f75e5bc18fde7a
Implement filesystem NB comments, relative paths, and related issues.

This is a fairly large patch that implements all of the filesystem NB comments
and the relative paths changes (ex. adding weakly_canonical). These issues
and papers are all interrelated so their implementation couldn't be split up
nicely.

This patch upgrades <experimental/filesystem> to match the C++17 spec and not
the published experimental TS spec. Some of the changes in this patch are both
API and ABI breaking, however libc++ makes no guarantee about stability for
experimental implementations.

The major changes in this patch are:

* Implement NB comments for filesystem (P0492R2), including:
  * Implement `perm_options` enum as part of NB comments, and update the
    `permissions` function to match.
  * Implement changes to `remove_filename` and `replace_filename`
  * Implement changes to `path::stem()` and `path::extension()` which support
    splitting examples like `.profile`.
  * Change path iteration to return an empty path instead of '.' for trailing
    separators.
  * Change `operator/=` to handle absolute paths on the RHS.
  * Change `absolute` to no longer accept a current path argument.

* Implement relative paths according to NB comments (P0219r1)

* Combine `path.cpp` and `operations.cpp` since some path functions require
  access to the operations internals, and some fs operations require access
  to the path parser.

llvm-svn: 329028
30 files changed:
libcxx/benchmarks/CMakeLists.txt
libcxx/benchmarks/GenerateInput.hpp
libcxx/benchmarks/filesystem.bench.cpp
libcxx/include/experimental/filesystem
libcxx/src/experimental/filesystem/operations.cpp
libcxx/src/experimental/filesystem/path.cpp [deleted file]
libcxx/test/libcxx/experimental/filesystem/class.path/path.member/path.append.pass.cpp [deleted file]
libcxx/test/std/experimental/filesystem/class.path/path.itr/iterator.pass.cpp
libcxx/test/std/experimental/filesystem/class.path/path.member/path.append.pass.cpp
libcxx/test/std/experimental/filesystem/class.path/path.member/path.compare.pass.cpp
libcxx/test/std/experimental/filesystem/class.path/path.member/path.decompose/empty.fail.cpp
libcxx/test/std/experimental/filesystem/class.path/path.member/path.decompose/path.decompose.pass.cpp
libcxx/test/std/experimental/filesystem/class.path/path.member/path.gen/lexically_normal.pass.cpp [new file with mode: 0644]
libcxx/test/std/experimental/filesystem/class.path/path.member/path.gen/lexically_relative_and_proximate.pass.cpp [new file with mode: 0644]
libcxx/test/std/experimental/filesystem/class.path/path.member/path.generic.obs/generic_string_alloc.pass.cpp
libcxx/test/std/experimental/filesystem/class.path/path.member/path.generic.obs/named_overloads.pass.cpp
libcxx/test/std/experimental/filesystem/class.path/path.member/path.modifiers/remove_filename.pass.cpp
libcxx/test/std/experimental/filesystem/class.path/path.member/path.modifiers/replace_filename.pass.cpp
libcxx/test/std/experimental/filesystem/fs.enum/enum.perm_options.pass.cpp [new file with mode: 0644]
libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.absolute/absolute.pass.cpp
libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.canonical/canonical.pass.cpp
libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.last_write_time/last_write_time.pass.cpp
libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.proximate/proximate.pass.cpp [new file with mode: 0644]
libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.relative/relative.pass.cpp [new file with mode: 0644]
libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.system_complete/system_complete.pass.cpp [deleted file]
libcxx/test/std/experimental/filesystem/fs.op.funcs/fs.op.weakly_canonical/weakly_canonical.pass.cpp [new file with mode: 0644]
libcxx/test/support/filesystem_test_helper.hpp
libcxx/test/support/verbose_assert.h [new file with mode: 0644]
libcxx/www/cxx1z_status.html
libcxx/www/cxx2a_status.html