Before:
Constructor
: LooooooooooooooooooooongVariable(
LooooooooooooooooooooongValue) {}
After:
Constructor
: LooooooooooooooooooooongVariable(
LooooooooooooooooooooongValue) {}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173685
91177308-0d34-0410-b5e6-
96231b3b80d8
// Top-level spaces are exempt as that mostly leads to better results.
State.Stack.back().LastSpace = State.Column;
else if ((Previous.Type == TT_BinaryOperator ||
- Previous.Type == TT_ConditionalExpr) &&
+ Previous.Type == TT_ConditionalExpr ||
+ Previous.Type == TT_CtorInitializerColon) &&
getPrecedence(Previous) != prec::Assignment)
State.Stack.back().LastSpace = State.Column;
else if (Previous.ParameterCount > 1 &&
" aaaaaaaaaaaaaaaaaaaaaaaaaaa),\n"
" aaaaaaaaaaaaaaaaaaaaaaa() {\n}");
+ verifyFormat("Constructor()\n"
+ " : aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(\n"
+ " aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) {\n}");
+
// Here a line could be saved by splitting the second initializer onto two
// lines, but that is not desireable.
verifyFormat(