[libcxx-commits] [PATCH] D96955: libcxx: use early returns
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Feb 18 07:43:59 PST 2021
ldionne accepted this revision.
ldionne added a comment.
This revision is now accepted and ready to land.
LGTM. Please wait for CI to finish and ship it.
CI is successful when this is green:
F15576017: Screen Shot 2021-02-18 at 10.43.22.png <https://reviews.llvm.org/F15576017>
================
Comment at: libcxx/src/filesystem/operations.cpp:1065
+ if (errno != EEXIST)
+ return err.report(capture_errno());
+
----------------
joerg wrote:
> 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.
Agreed.
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