This revision was automatically updated to reflect the committed changes.
Closed by commit rG072ae7c1e64f: [clang-format] Always break line after enum
opening brace (authored by MyDeveloperDay, committed by paulhoad
).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAS
osandov added a comment.
Thank you! I don't have commit access. How can I get this committed?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77682/new/
https://reviews.llvm.org/D77682
___
cfe-commits ma
MyDeveloperDay accepted this revision.
MyDeveloperDay added a comment.
This revision is now accepted and ready to land.
LGTM
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77682/new/
https://reviews.llvm.org/D77682
___
osandov updated this revision to Diff 256352.
osandov edited the summary of this revision.
osandov added a comment.
Update summary and test case to better reflect the issue
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77682/new/
https://reviews.ll
MyDeveloperDay added a comment.
I understand now what you are trying to achieve, could you capture something
more like that in your tests too.. (just so we don't break this change later)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77682/new/
htt
osandov added a comment.
The style guide I'm following (the Linux kernel style) wants `AfterEnum:
false`. A cursory search suggests that people treat this trailing comma
behavior as a feature
(https://stackoverflow.com/questions/23072223/clang-format-style-options-for-enums).
However, I think
MyDeveloperDay added a comment.
I think what is interesting is
BreakBeforeBraces: Custom
BraceWrapping:
AfterEnum: false
gets messed up completely by the `,` and that IS a bug in my view
$ clang-format enum.cpp
enum {
A,
};
enum { B, C, D };
enum {
B,
C,
MyDeveloperDay added a comment.
Did you try:
BreakBeforeBraces: Custom
BraceWrapping:
AfterEnum: true
with AfterEnum:true
$ clang-format enum.cpp
enum
{
A,
};
enum
{
B,
C,
D
};
enum
{
E
};
with AfterEnum:false
$ clang-format enum.cpp
e
osandov created this revision.
osandov added reviewers: MyDeveloperDay, krasimir.
osandov added projects: clang-format, clang.
Herald added a subscriber: cfe-commits.
clang-format currently puts the first enumerator on the same line as the
enum keyword and opening brace if it fits (for example, fo