Reformat <__filesystem/operations.h>
Details
- Reviewers
• Quuxplusone Mordante ldionne - Group Reviewers
Restricted Project - Commits
- rGf2277e60f4a7: [libc++][NFC] Reformat <__filesystem/operations.h>
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libcxx/include/__filesystem/operations.h | ||
---|---|---|
32–33 | FWIW, these 26 lines seem uncontroversial to me. Below this point, stuff gets messy. | |
60 | s/_LIBCPP_INLINE_VISIBILITY/_LIBCPP_HIDE_FROM_ABI/ throughout this file — it'll save you some column width. Perhaps do that as a separate NFC commit (even though the whole thing is NFC anyway). | |
168–169 | For all of these inline one-liners, I'd strongly prefer that they be formatted consistently. I don't have a strong preference for inline _LIBCPP_HIDE_FROM_ABI function header() { return oneliner; } versus inline _LIBCPP_HIDE_FROM_ABI function header() { return oneliner; } versus inline _LIBCPP_HIDE_FROM_ABI function header() { return oneliner; } versus inline _LIBCPP_HIDE_FROM_ABI function header() { return oneliner; } versus inline _LIBCPP_HIDE_FROM_ABI function header() { return oneliner; } but let's be consistent. Also, if we choose anything other than the first option (all-on-one-source-line), then let's add one blank line after each function, so they don't all run together visually. |
libcxx/include/__filesystem/operations.h | ||
---|---|---|
168–169 | Do you mean by the first one "ignore any line length limitation and put them in a single line"? |
libcxx/include/__filesystem/operations.h | ||
---|---|---|
168–169 |
Yes. (And likewise for the other possibilities, I mean "ignore any line length capabilities and put them all like this." My goal is to avoid the current state where my eyes are constantly having to scan back and forth to figure out "how is this function formatted?" — instead these functions should all just use the same formatting style, consistently.) |
I would replace _LIBCPP_INLINE_VISIBILITY with _LIBCPP_HIDE_FROM_ABI and move the two __ functions in a following commit
Put one-liners in a single line
FWIW, I have no strong preference here. I think the code was readable before and is readable after. I think this is a follow up on a suggestion I made in an earlier modularization patch where I suggested aligning stuff would highlight that they are all forwarding to functions inside the dylib. That's the main benefit I see with this patch.
LGTM, but please rename to _LIBCPP_HIDE_FROM_ABI in another patch (or this one, IDC).
FWIW, these 26 lines seem uncontroversial to me. Below this point, stuff gets messy.