[PATCH] D93938: [clang-format] Fixed AfterEnum handling
Ally Tiritoglu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 30 13:43:59 PST 2020
atirit added a comment.
>From what I can tell the unit tests are broken. Take `FormatTest.ShortEnums` for example. It passes the following code:
enum
{
A,
B,
C
} ShortEnum1, ShortEnum2;
And expects no changes to be made.
However, format unit tests use the `BreakBeforeBraces: Attach` option. This option should attach braces to the same line, as demonstrated in the docs <https://clang.llvm.org/docs/ClangFormatStyleOptions.html>:
> `BS_Attach` (in configuration: `Attach`) Always attach braces to surrounding context.
>
> namespace N {
> enum E {
> E1,
> E2,
> };
> // ...
> }
I'm new to this project so please correct me if I'm wrong, but this appears to indicate broken tests. I'll push a commit with fixed tests.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93938/new/
https://reviews.llvm.org/D93938
More information about the cfe-commits
mailing list