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

Tomáš Slanina via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 3 08:46:02 PDT 2025


================
@@ -15277,6 +15290,123 @@ TEST_F(FormatTest, NeverMergeShortRecords) {
                Style);
 }
 
+TEST_F(FormatTest, AllowShortRecordOnASingleLineNonSplit) {
+  FormatStyle Style = getLLVMStyle();
+
+  Style.BreakBeforeBraces = FormatStyle::BS_Custom;
+  Style.BraceWrapping.SplitEmptyRecord = false;
----------------
itzexpoexpo wrote:

The entire test uses SplitEmptyRecord = false

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


More information about the cfe-commits mailing list