[clang] [clang-format] Add BreakBeforeTemplateClose option (PR #118046)
Owen Pan via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 18 23:12:13 PST 2025
================
@@ -1235,6 +1239,9 @@ unsigned ContinuationIndenter::addTokenOnNewLine(LineState &State,
Style.AlignAfterOpenBracket == FormatStyle::BAS_BlockIndent;
}
+ if (PreviousNonComment && PreviousNonComment->is(tok::less))
+ CurrentState.BreakBeforeClosingAngle = true;
----------------
owenca wrote:
```suggestion
if (PreviousNonComment && PreviousNonComment->is(TT_TemplateOpener)) {
CurrentState.BreakBeforeClosingAngle =
Style.BreakBeforeTemplateCloser == FormatStyle::BBTCS_BlockIndent;
}
```
https://github.com/llvm/llvm-project/pull/118046
More information about the cfe-commits
mailing list