File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -595,13 +595,17 @@ class LineJoiner {
595
595
return Style.BraceWrapping .AfterClass ;
596
596
case TT_UnionLBrace:
597
597
return Style.BraceWrapping .AfterUnion ;
598
+ default :
599
+ return false ;
598
600
};
599
601
};
600
602
601
603
// Current line begins both record and block, brace was not wrapped.
602
604
if (Line->Last ->isOneOf (TT_StructLBrace, TT_ClassLBrace, TT_UnionLBrace)) {
603
605
auto TryMergeShortRecord = [&] {
604
606
switch (Style.AllowShortRecordOnASingleLine ) {
607
+ case FormatStyle::SRS_Never:
608
+ return false ;
605
609
case FormatStyle::SRS_EmptyIfAttached:
606
610
case FormatStyle::SRS_Empty:
607
611
return NextLine->First ->is (tok::r_brace);
@@ -643,7 +647,7 @@ class LineJoiner {
643
647
const bool IsEmptyBlock =
644
648
Line->Last ->is (tok::l_brace) && NextLine->First ->is (tok::r_brace);
645
649
646
- if (IsEmptyBlock && !Style.BraceWrapping .SplitEmptyRecord ||
650
+ if (( IsEmptyBlock && !Style.BraceWrapping .SplitEmptyRecord ) ||
647
651
Style.AllowShortBlocksOnASingleLine == FormatStyle::SBS_Always) {
648
652
return tryMergeSimpleBlock (I, E, Limit);
649
653
}
You can’t perform that action at this time.
0 commit comments