[libcxx-commits] [PATCH] D96955: libcxx: use early returns
    Joerg Sonnenberger via Phabricator via libcxx-commits 
    libcxx-commits at lists.llvm.org
       
    Thu Feb 18 06:56:17 PST 2021
    
    
  
joerg added inline comments.
================
Comment at: libcxx/src/filesystem/operations.cpp:1065
+  if (errno != EEXIST)
+    return err.report(capture_errno());
+
----------------
ldionne wrote:
> I found it easier to understand when we unconditionally returned `false` at the end of the function TBH. Now, I have to go and figure out what `ErrorHandler<bool>::report()` returns when I'm just glancing at the function.
But you already have to know that for the two uses before in this function. Now it is at least consistent.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96955/new/
https://reviews.llvm.org/D96955
    
    
More information about the libcxx-commits
mailing list