summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/ContinuationIndenter.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-06-02 15:14:21 +0000
committerDaniel Jasper <djasper@google.com>2015-06-02 15:14:21 +0000
commit199d0c9e764e69895d3d79553696de514be31ad2 (patch)
treec0618000e4379e7c01a8d591d56b36622a43b559 /clang/lib/Format/ContinuationIndenter.cpp
parent6e8917bce1b4da623e41f06126443c2db424a1bb (diff)
downloadbcm5719-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.cpp3
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) ||
OpenPOWER on IntegriCloud