With AlwaysSplitBeforeMultilineStrings, clang-format would not find any
valid solution.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210513
91177308-0d34-0410-b5e6-
96231b3b80d8
if (Style.AlwaysBreakBeforeMultilineStrings &&
State.Column > State.Stack.back().Indent && // Breaking saves columns.
!Previous.isOneOf(tok::kw_return, tok::lessless, tok::at) &&
- Previous.Type != TT_InlineASMColon && nextIsMultilineString(State))
+ Previous.Type != TT_InlineASMColon &&
+ Previous.Type != TT_ConditionalExpr && nextIsMultilineString(State))
return true;
if (((Previous.Type == TT_DictLiteral && Previous.is(tok::l_brace)) ||
Previous.Type == TT_ArrayInitializerLSquare) &&
" L\"cccc\");",
Break);
+ // As we break before unary operators, breaking right after them is bad.
+ verifyFormat("string foo = abc ? \"x\"\n"
+ " \"blah blah blah blah blah blah\"\n"
+ " : \"y\";",
+ Break);
+
// Don't break if there is no column gain.
verifyFormat("f(\"aaaa\"\n"
" \"bbbb\");",