itzexpoexpo wrote:

> The command-line option `-style='{AllowShortRecordsOnASingleLine: Never}'` I 
> used in the example implies `AfterClass: false`, so `SplitEmptyRecord` 
> doesn't matter. See 
> 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?

> `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.

https://github.com/llvm/llvm-project/pull/154580
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to