[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
================
@@ -406,6 +406,10 @@ bool ContinuationIndenter::mustBreak(const LineState &State) {
}
if (CurrentState.BreakBeforeClosingParen && Current.is(tok::r_paren))
return true;
+ if (CurrentState.BreakBeforeClosingAngle && Current.is(TT_TemplateCloser) &&
+ Style.BreakBeforeTemplateCloser == FormatStyle::BBTCS_BlockIndent) {
+ return true;
+ }
----------------
owenca wrote:
```suggestion
if (CurrentState.BreakBeforeClosingAngle && Current.is(TT_TemplateCloser))
return true;
```
See below.
https://github.com/llvm/llvm-project/pull/118046
More information about the cfe-commits
mailing list