=?utf-8?q?Tomáš?= Slanina <[email protected]>,
=?utf-8?q?Tomáš?= Slanina <[email protected]>,
=?utf-8?q?Tomáš?= Slanina <[email protected]>,
=?utf-8?q?Tomáš?= Slanina <[email protected]>,
=?utf-8?q?Tomáš?= Slanina <[email protected]>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>
owenca wrote:
> > The command-line option `-style='{AllowShortRecordsOnASingleLine: Never}'`
> > I used in the example implies `AfterClass: false`, so `SplitEmptyRecord`
> > doesn't matter. See [#154796
> > (comment)](https://github.com/llvm/llvm-project/issues/154796#issuecomment-3218392876).
>
> The same code that merges the brace for `SplitEmptyRecord` does the same for
> `AllowShortRecordOnASingleLine` since `Never` is treated as "option ignored",
> changing it so that the behavior is overriden means with the default config
> you'd get:
>
> ```c++
> struct foo {
> };
> ```
>
> from your comment I understood this behavior is not to be changed?
See https://github.com/llvm/llvm-project/pull/154580/files#r2296871961. The
default (i.e. the LLVM style) of `AllowShortRecordOnASingleLine` sould be
`Empty`.
> > `SplitEmptyRecord: true`, which is effective here, should override
> > `AllowShortRecordsOnASingleLine` for empty records.
>
> Right, so is the expected behavior this:
>
> ```c++
> $ clang-format -style="{AllowShortRecordsOnASingleLine: Empty, BraceWrapping:
> {AfterClass: true}, BreakBeforeBraces: Custom}" a.cpp
> struct foo
> {
> };
> ```
>
> i.e. should `SplitEmptyRecord: true` mean that
> `AllowShortRecordOnASingleLine` is effectively ignored? Just checking if I
> understand correctly.
Yep!
https://github.com/llvm/llvm-project/pull/154580
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits