------------------------------------------------------------------------
r257763 | djasper | 2016-01-14 05:36:46 -0800 (Thu, 14 Jan 2016) | 8 lines
clang-format: Fix incorrectly enforced linebreak with ColumnLimit 0.
Before:
aaaa[bbbb]
.cccc();
After:
aaaa[bbbb].cccc();
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_38@261225
91177308-0d34-0410-b5e6-
96231b3b80d8
return true;
unsigned NewLineColumn = getNewLineColumn(State);
- if (Current.isMemberAccess() &&
+ if (Current.isMemberAccess() && Style.ColumnLimit != 0 &&
State.Column + getLengthToNextOperator(Current) > Style.ColumnLimit &&
(State.Column > NewLineColumn ||
Current.NestingLevel < State.StartOfLineLevel))
" .aaaaaaaaaaaaaaaaaaaaaa();");
verifyNoCrash("a[,Y?)]", getLLVMStyleWithColumns(10));
+
+ FormatStyle NoColumnLimit = getLLVMStyleWithColumns(0);
+ verifyFormat("aaaaa[bbbbbb].cccccc()", NoColumnLimit);
}
TEST_F(FormatTest, LineStartsWithSpecialCharacter) {