[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
================
@@ -1371,6 +1378,11 @@ unsigned ContinuationIndenter::getNewLineColumn(const LineState &State) {
State.Stack.size() > 1) {
return State.Stack[State.Stack.size() - 2].LastSpace;
}
+ if (Current.is(TT_TemplateCloser) &&
+ Style.BreakBeforeTemplateCloser != FormatStyle::BBTCS_Never &&
+ State.Stack.size() > 1) {
----------------
owenca wrote:
```suggestion
if (Style.BreakBeforeTemplateCloser == FormatStyle::BBTCS_BlockIndent &&
Current.is(TT_TemplateCloser) && State.Stack.size() > 1) {
```
https://github.com/llvm/llvm-project/pull/118046
More information about the cfe-commits
mailing list