getColumnLimit(State))
BreakBeforeParameter = true;
}
- bool NoLineBreak =
- State.Stack.back().NoLineBreak ||
- ((Current.NestingLevel != 0 || Current.Type == TT_TemplateOpener) &&
- State.Stack.back().ContainsUnwrappedBuilder);
+ bool NoLineBreak = State.Stack.back().NoLineBreak ||
+ (Current.Type == TT_TemplateOpener &&
+ State.Stack.back().ContainsUnwrappedBuilder);
State.Stack.push_back(ParenState(NewIndent, NewIndentLevel,
State.Stack.back().LastSpace,
AvoidBinPacking, NoLineBreak));
" .aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<\n"
" aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>();");
- // Prefer not to break after empty parentheses ...
+ // Prefer not to break after empty parentheses.
verifyFormat("FirstToken->WhitespaceRange.getBegin().getLocWithOffset(\n"
" First->LastNewlineOffset);");
- // ... unless nested.
- verifyFormat("f(FirstToken->WhitespaceRange.getBegin()\n"
- " .getLocWithOffset(First->LastNewlineOffset));");
}
TEST_F(FormatTest, BreaksAccordingToOperatorPrecedence) {