@@ -637,13 +637,13 @@ class LineJoiner {
637637 const auto BraceOpenLine = I + OpenBraceWrapped;
638638
639639 assert (*BraceOpenLine);
640- if ((* BraceOpenLine) ->Last ->isNot (tok::l_brace ))
640+ if (BraceOpenLine[ 0 ] ->Last ->isNot (TT_NamespaceLBrace ))
641641 return 0 ;
642642
643643 if (std::distance (BraceOpenLine, E) <= 2 )
644644 return 0 ;
645645
646- if (BraceOpenLine[0 ]->Last ->is (TT_LineComment ))
646+ if (BraceOpenLine[0 ]->Last ->is (tok::comment ))
647647 return 0 ;
648648
649649 assert (BraceOpenLine[1 ]);
@@ -682,7 +682,8 @@ class LineJoiner {
682682 return 0 ;
683683 // Check that the line after the inner result starts with a closing brace
684684 // which we are permitted to merge into one line.
685- if (I[N]->First ->is (tok::r_brace) && !I[N]->First ->MustBreakBefore &&
685+ if (I[N]->First ->is (TT_NamespaceRBrace) &&
686+ !I[N]->First ->MustBreakBefore &&
686687 BraceOpenLine[MergedLines + 1 ]->Last ->isNot (tok::comment) &&
687688 nextNLinesFitInto (I, I + N + 1 , Limit)) {
688689 return N;
@@ -698,7 +699,7 @@ class LineJoiner {
698699 return 0 ;
699700
700701 // Last, check that the third line starts with a closing brace.
701- if (L2.First ->isNot (tok::r_brace ) || L2.First ->MustBreakBefore )
702+ if (L2.First ->isNot (TT_NamespaceRBrace ) || L2.First ->MustBreakBefore )
702703 return 0 ;
703704
704705 // If so, merge all lines.
0 commit comments