================
@@ -2756,6 +2756,10 @@ FormatToken
*UnwrappedLineParser::parseIfThenElse(IfStmtKind *IfKind,
CompoundStatementIndenter Indenter(this, Style, Line->Level);
parseBlock(/*MustBeDeclaration=*/false, /*AddLevels=*/1u,
/*MunchSemi=*/true, KeepIfBraces, &IfBlockKind);
+ if (auto Prev = FormatTok->getPreviousNonComment();
+ Prev && Prev->is(tok::r_brace)) {
+ Prev->setFinalizedType(TT_ControlStatementRBrace);
+ }
----------------
owenca wrote:
Consider moving this into a function e.g.
`UnwrappedLineParser::setRBraceType(TokenType)` as it's duplicated multiple
times below.
https://github.com/llvm/llvm-project/pull/68621
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits