[clang] [clang-format] Add option AllowShortRecordOnASingleLine (PR #154580)

via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 7 14:47:49 PDT 2025


=?utf-8?q?Tomáš?= Slanina <itzexpoexpo at gmail.com>,
=?utf-8?q?Tomáš?= Slanina <itzexpoexpo at gmail.com>,
=?utf-8?q?Tomáš?= Slanina <itzexpoexpo at gmail.com>,
=?utf-8?q?Tomáš?= Slanina <itzexpoexpo at gmail.com>,
=?utf-8?q?Tomáš?= Slanina <itzexpoexpo at gmail.com>,
=?utf-8?q?Tomáš?= Slanina <itzexpoexpo at gmail.com>,
=?utf-8?q?Tomáš?= Slanina <itzexpoexpo at gmail.com>,
=?utf-8?q?Tomáš?= Slanina <itzexpoexpo at gmail.com>,
=?utf-8?q?Tomáš?= Slanina <itzexpoexpo at gmail.com>,
=?utf-8?q?Tomáš?= Slanina <itzexpoexpo at gmail.com>,
=?utf-8?q?Tomáš?= Slanina <itzexpoexpo at gmail.com>,
=?utf-8?q?Tomáš?= Slanina <itzexpoexpo at gmail.com>,
=?utf-8?q?Tomáš?= Slanina <itzexpoexpo at gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/154580 at github.com>


owenca wrote:

There's still a remaining issue related to https://github.com/llvm/llvm-project/pull/154580#issuecomment-3227597240.

.clang-format:
```
AllowShortBlocksOnASingleLine: Always
AllowShortRecordOnASingleLine: Never
BreakBeforeBraces: Custom
BraceWrapping:
  AfterClass: true
```

Expected:
```
class foo
{ int i; };
```

Actual:
```
class foo
{
  int i;
};
```

Should we merge this patch and fix the issue in another patch? @HazardyKnusperkeks @mydeveloperday

https://github.com/llvm/llvm-project/pull/154580


More information about the cfe-commits mailing list