=?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:
> > ...
> >
> > * `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.
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.
> If you use `AfterClass: true` you get the correct behavior:
>
> ```
> $ clang-format -style="{AllowShortRecordsOnASingleLine: Empty, BraceWrapping:
> {AfterClass: true}, BreakBeforeBraces: Custom}" a.cpp
> class foo {};
`SplitEmptyRecord: true`, which is effective here, should override
`AllowShortRecordsOnASingleLine` for empty records.
https://github.com/llvm/llvm-project/pull/154580
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits