This fixes:
/*
*
* something long going over the column limit.
*/
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182932
91177308-0d34-0410-b5e6-
96231b3b80d8
Lines[i] = Lines[i].substr(Offset);
LeadingWhitespace[i] += Offset;
}
+ // Exclude empty lines from the calculation of the left-most column.
+ if (Lines[i].empty())
+ continue;
IndentAtLineBreak = std::min<int>(IndentAtLineBreak, StartOfLineColumn[i]);
}
DEBUG({
"/* */someCall(parameter);",
getLLVMStyleWithColumns(15)));
EXPECT_EQ("/*\n**\n*/", format("/*\n**\n*/"));
+ // FIXME: Consider whether empty lines can dictated the left-most column.
+ EXPECT_EQ("/*\n"
+ "*\n"
+ " * aaaaaa\n"
+ " * aaaaaa\n"
+ "*/",
+ format("/*\n"
+ "*\n"
+ " * aaaaaa aaaaaa\n"
+ "*/",
+ getLLVMStyleWithColumns(10)));
FormatStyle NoBinPacking = getLLVMStyle();
NoBinPacking.BinPackParameters = false;