[libcxx-commits] [PATCH] D96955: libcxx: use early returns
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Feb 18 06:41:22 PST 2021
ldionne added a comment.
This looks correct, but I'm not sure what we gain from making this change?
================
Comment at: libcxx/src/filesystem/operations.cpp:1065
+ if (errno != EEXIST)
+ return err.report(capture_errno());
+
----------------
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.
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