@@ -304,8 +304,8 @@ bool ContinuationIndenter::canBreak(const LineState &State) {
304304 Current.closesBlockOrBlockTypeList (Style))) {
305305 return false ;
306306 }
307- if (Style.BreakBeforeTemplateCloser == FormatStyle::BBTCS_BlockIndent &&
308- Current. is (TT_TemplateCloser) && !CurrentState.BreakBeforeClosingAngle ) {
307+ if (Style.BreakBeforeTemplateCloser && Current. is (TT_TemplateCloser) &&
308+ !CurrentState.BreakBeforeClosingAngle ) {
309309 return false ;
310310 }
311311 // The opening "{" of a braced list has to be on the same line as the first
@@ -1249,10 +1249,8 @@ unsigned ContinuationIndenter::addTokenOnNewLine(LineState &State,
12491249 Style.AlignAfterOpenBracket == FormatStyle::BAS_BlockIndent;
12501250 }
12511251
1252- if (PreviousNonComment && PreviousNonComment->is (TT_TemplateOpener)) {
1253- CurrentState.BreakBeforeClosingAngle =
1254- Style.BreakBeforeTemplateCloser == FormatStyle::BBTCS_BlockIndent;
1255- }
1252+ if (PreviousNonComment && PreviousNonComment->is (TT_TemplateOpener))
1253+ CurrentState.BreakBeforeClosingAngle = Style.BreakBeforeTemplateCloser ;
12561254
12571255 if (CurrentState.AvoidBinPacking ) {
12581256 // If we are breaking after '(', '{', '<', or this is the break after a ':'
@@ -1390,8 +1388,8 @@ unsigned ContinuationIndenter::getNewLineColumn(const LineState &State) {
13901388 State.Stack .size () > 1 ) {
13911389 return State.Stack [State.Stack .size () - 2 ].LastSpace ;
13921390 }
1393- if (Style.BreakBeforeTemplateCloser == FormatStyle::BBTCS_BlockIndent &&
1394- Current. is (TT_TemplateCloser) && State.Stack .size () > 1 ) {
1391+ if (Style.BreakBeforeTemplateCloser && Current. is (TT_TemplateCloser) &&
1392+ State.Stack .size () > 1 ) {
13951393 return State.Stack [State.Stack .size () - 2 ].LastSpace ;
13961394 }
13971395 if (NextNonComment->is (TT_TemplateString) && NextNonComment->closesScope ())
0 commit comments