This used to interfere with AlwaysBreakBeforeMultilineStrings.
This fixes llvm.org/PR17856.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194310
91177308-0d34-0410-b5e6-
96231b3b80d8
return true;
if (Style.AlwaysBreakBeforeMultilineStrings &&
State.Column > State.Stack.back().Indent && // Breaking saves columns.
- !Previous.isOneOf(tok::kw_return, tok::lessless) &&
+ !Previous.isOneOf(tok::kw_return, tok::lessless, tok::at) &&
Previous.Type != TT_InlineASMColon && NextIsMultilineString(State))
return true;
if (((Previous.Type == TT_DictLiteral && Previous.is(tok::l_brace)) ||
"b\\\n"
"c\";",
Break));
+
+ // Exempt ObjC strings for now.
+ EXPECT_EQ("NSString *const kString = @\"aaaa\"\n"
+ " \"bbbb\";",
+ format("NSString *const kString = @\"aaaa\"\n"
+ "\"bbbb\";",
+ Break));
}
TEST_F(FormatTest, AlignsPipes) {