itzexpoexpo wrote:

> ... 
> * `Never`
> 
> 
> ```c++
> class foo {
> };
> 
> class bar {
>   int i;
> };
> ```
> 
> Am I correct?

Yes, except `Never` then depends on `SplitEmptyRecord` and is therefore also 
affected by #154796. If you use `AfterClass: true` you get the correct behavior:
```
$ clang-format -style="{AllowShortRecordsOnASingleLine: Empty, BraceWrapping: 
{AfterClass: true}, BreakBeforeBraces: Custom}" a.cpp
class foo {};

class bar
{
  int i;
};

$ clang-format -style="{AllowShortRecordsOnASingleLine: Never, BraceWrapping: 
{AfterClass: true}, BreakBeforeBraces: Custom}" a.cpp
class foo
{
};

class bar
{
  int i;
};
```
Both are currently correct unless the handling of `SplitEmptyRecord` is changed 
in some way.

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