[PATCH] D98237: [clang-format] Option for empty lines after an access modifier.
Marek Kurdej via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 12 13:04:19 PST 2021
curdeius added a comment.
I'm missing tests with both EmptyLineBeforeAccessModifier and EmptyLine(s)AfterAccessModifier options.
And possibly other options that could interfere with them.
================
Comment at: clang/include/clang/Format/Format.h:1957
+ /// Defines how many lines are put after access modifiers.
+ unsigned EmptyLinesAfterAccessModifier;
+
----------------
This option seems to be very different from `EmptyLineBeforeAccessModifier`. I don't mean in what it does, because this is analogical, but in the possible options.
Wouldn't it be less surprising to have (at least some) similar options here and there?
Is there any value in having more than one line after access modifiers? Couldn't that be achieved with Leave option?
How do the two options work together?
Also, the difference in singular vs. plural form of "Line(s)" in these two options is disconcerting.
>From the user perspective, it's error-prone to have two options that are at the same time so similar and so different.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98237/new/
https://reviews.llvm.org/D98237
More information about the cfe-commits
mailing list