================ @@ -5682,12 +5683,15 @@ bool TokenAnnotator::mustBreakBefore(const AnnotatedLine &Line, (Style.BreakTemplateDeclarations == FormatStyle::BTDS_Leave && Right.NewlinesBefore > 0); } - if (Left.ClosesRequiresClause && Right.isNot(tok::semi) && - Right.isNot(tok::l_brace)) { + if (Left.ClosesRequiresClause && Right.isNot(tok::semi)) { switch (Style.RequiresClausePosition) { case FormatStyle::RCPS_OwnLine: case FormatStyle::RCPS_WithPreceding: return true; + case FormatStyle::RCPS_OwnLineWithBrace: + if (Right.isNot(tok::l_brace)) + return true; + break; ---------------- HazardyKnusperkeks wrote:
```suggestion return Right.isNot(tok::l_brace); ``` When it's not a brace you want it to break. I'm sure you can find a test case which fails without this change and passes with. https://github.com/llvm/llvm-project/pull/102078 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits