[libcxx-commits] [PATCH] D151493: [libcxx] Handle windows system error code mapping in std::error_code.

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu May 25 14:05:57 PDT 2023


philnik added a comment.

Could you split the NFC changes into a separate patch?



================
Comment at: libcxx/include/__filesystem/directory_entry.h:331-335
     if (!__ec)
       return true;
-    switch (static_cast<errc>(__ec.value())) {
-    case errc::no_such_file_or_directory:
-    case errc::not_a_directory:
+    if (__ec == errc::no_such_file_or_directory || __ec == errc::not_a_directory)
       return true;
+    return false;
----------------
This should be equivalent, unless I'm missing something.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151493/new/

https://reviews.llvm.org/D151493



More information about the libcxx-commits mailing list