diff options
author | Daniel Jasper <djasper@google.com> | 2015-06-02 15:14:21 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2015-06-02 15:14:21 +0000 |
commit | 199d0c9e764e69895d3d79553696de514be31ad2 (patch) | |
tree | c0618000e4379e7c01a8d591d56b36622a43b559 /clang/lib/Format/ContinuationIndenter.cpp | |
parent | 6e8917bce1b4da623e41f06126443c2db424a1bb (diff) | |
download | bcm5719-llvm-199d0c9e764e69895d3d79553696de514be31ad2.tar.gz bcm5719-llvm-199d0c9e764e69895d3d79553696de514be31ad2.zip |
clang-format: [JS] Fix incorrect line length calculation.
llvm-svn: 238841
Diffstat (limited to 'clang/lib/Format/ContinuationIndenter.cpp')
-rw-r--r-- | clang/lib/Format/ContinuationIndenter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Format/ContinuationIndenter.cpp b/clang/lib/Format/ContinuationIndenter.cpp index 39b2793feef..204bcc9df4f 100644 --- a/clang/lib/Format/ContinuationIndenter.cpp +++ b/clang/lib/Format/ContinuationIndenter.cpp @@ -159,7 +159,8 @@ bool ContinuationIndenter::mustBreak(const LineState &State) { if (((Previous.is(TT_DictLiteral) && Previous.is(tok::l_brace)) || Previous.is(TT_ArrayInitializerLSquare)) && Style.ColumnLimit > 0 && - getLengthToMatchingParen(Previous) + State.Column > getColumnLimit(State)) + getLengthToMatchingParen(Previous) + State.Column - 1 > + getColumnLimit(State)) return true; if (Current.is(TT_CtorInitializerColon) && ((Style.AllowShortFunctionsOnASingleLine != FormatStyle::SFS_All) || |