Before:
int i; // indented 2 space more than clang-format would use.
SomeReturnType // clang-format invoked on this line.
SomeFunctionMakingLBraceEndInColumn80() {
} // This is the indent clang-format would prefer.
After:
int i; // indented 2 space more than clang-format would use.
SomeReturnType // clang-format invoked on this line.
SomeFunctionMakingLBraceEndInColumn80() {
}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186120
91177308-0d34-0410-b5e6-
96231b3b80d8
if (Current.BlockKind == BK_BracedInit)
State.Column = State.Stack[State.Stack.size() - 2].LastSpace;
else
- State.Column = Line.Level * Style.IndentWidth;
+ State.Column = FirstIndent;
} else if (Current.is(tok::string_literal) &&
State.StartOfStringLiteral != 0) {
State.Column = State.StartOfStringLiteral;
" // line 2\n"
" int b;",
35, 0, getLLVMStyle()));
+ EXPECT_EQ(" int a;\n"
+ " void\n"
+ " ffffff() {\n"
+ " }",
+ format(" int a;\n"
+ "void ffffff() {}",
+ 11, 0, getLLVMStyleWithColumns(11)));
}
TEST_F(FormatTest, BreakStringLiterals) {