diff options
author | Daniel Jasper <djasper@google.com> | 2016-11-29 09:40:01 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2016-11-29 09:40:01 +0000 |
commit | 35e4122f48e3492073210f91f15fc18b2f52c9f0 (patch) | |
tree | b7bdb6aaf476ccded19dcdab502cd79b4e2ce836 /clang/lib/Format/ContinuationIndenter.cpp | |
parent | 65abfb110262caccf20302f52283fbde0f94bb20 (diff) | |
download | bcm5719-llvm-35e4122f48e3492073210f91f15fc18b2f52c9f0.tar.gz bcm5719-llvm-35e4122f48e3492073210f91f15fc18b2f52c9f0.zip |
clang-format: Fix unnnecessary line break.
Before:
aaaaaaaaaa(aaaa(aaaa,
aaaa), //
aaaa,
aaaaa);
After:
aaaaaaaaaa(aaaa(aaaa,
aaaa), //
aaaa, aaaaa);
llvm-svn: 288119
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 e74515eb3b3..2117a0ec93c 100644 --- a/clang/lib/Format/ContinuationIndenter.cpp +++ b/clang/lib/Format/ContinuationIndenter.cpp @@ -523,7 +523,8 @@ unsigned ContinuationIndenter::addTokenOnNewLine(LineState &State, Style.ContinuationIndentWidth; } - if ((Previous.isOneOf(tok::comma, tok::semi) && + if ((PreviousNonComment && + PreviousNonComment->isOneOf(tok::comma, tok::semi) && !State.Stack.back().AvoidBinPacking) || Previous.is(TT_BinaryOperator)) State.Stack.back().BreakBeforeParameter = false; |