================ @@ -453,6 +453,19 @@ class LineJoiner { } } + auto ShouldMergeShortRecords = [this, &I, &NextLine, PreviousLine, + TheLine]() { + if (Style.AllowShortRecordsOnASingleLine == FormatStyle::SRS_All) + return true; + if (Style.AllowShortRecordsOnASingleLine == FormatStyle::SRS_Empty && + NextLine.First->is(tok::r_brace)) { + return true; + } + return false; + }; + + bool MergeShortRecord = ShouldMergeShortRecords(); ---------------- HazardyKnusperkeks wrote:
```suggestion const bool MergeShortRecord = [this, &NextLine]() { switch (Style.AllowShortRecordsOnASingleLine) { case FormatStyle::SRS_All: return true; case FormatStyle::SRS_Empty: return NextLine.First->is(tok::r_brace); case FormatStyle::SRS_Never: return false; } }(); ``` 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