[all-commits] [llvm/llvm-project] c5e8f0: [libcxx] Explicitly return the expected error code...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Tue Mar 2 12:24:32 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c5e8f024dca9ddf6d14253fe2fcc5c4956de2d3c
      https://github.com/llvm/llvm-project/commit/c5e8f024dca9ddf6d14253fe2fcc5c4956de2d3c
  Author: Martin Storsjö <martin at martin.st>
  Date:   2021-03-02 (Tue, 02 Mar 2021)

  Changed paths:
    M libcxx/src/filesystem/operations.cpp

  Log Message:
  -----------
  [libcxx] Explicitly return the expected error code in create_directories if the parent isn't a directory

On windows, going ahead and actually trying to create the directory
doesn't return an error code that maps to
std::errc::not_a_directory in this case.

This fixes two cases of
    TEST_CHECK(ErrorIs(ec, std::errc::not_a_directory))
in filesystems/fs.op.funcs/fs.op.create_directories/create_directories.pass.cpp
for windows (in testcases added in 59c72a70121567f7aee347e96b4ac8f3cfe9f4b2).

Differential Revision: https://reviews.llvm.org/D97090




More information about the All-commits mailing list