summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/ContinuationIndenter.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2017-02-01 23:27:37 +0000
committerDaniel Jasper <djasper@google.com>2017-02-01 23:27:37 +0000
commitb127039c77cc78434d61303bbeb001fec53d4a63 (patch)
tree891b5666a18bf5c83feca24ac48d8702cf40a47e /clang/lib/Format/ContinuationIndenter.cpp
parent2b913b1f493107ae7ffb6c11e59094952d595e1e (diff)
downloadbcm5719-llvm-b127039c77cc78434d61303bbeb001fec53d4a63.tar.gz
bcm5719-llvm-b127039c77cc78434d61303bbeb001fec53d4a63.zip
clang-format: Fix incorrect line breaks after forced operator wraps.
Before: bool x = aaaaa // || bbbbb // || cccc; After: bool x = aaaaa // || bbbbb // || cccc; llvm-svn: 293839
Diffstat (limited to 'clang/lib/Format/ContinuationIndenter.cpp')
-rw-r--r--clang/lib/Format/ContinuationIndenter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/ContinuationIndenter.cpp b/clang/lib/Format/ContinuationIndenter.cpp
index 176f4674aab..a7eb82ad56f 100644
--- a/clang/lib/Format/ContinuationIndenter.cpp
+++ b/clang/lib/Format/ContinuationIndenter.cpp
@@ -420,7 +420,7 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState &State, bool DryRun,
P->getPrecedence() != prec::Assignment &&
P->getPrecedence() != prec::Relational) {
bool BreakBeforeOperator =
- P->is(tok::lessless) ||
+ P->MustBreakBefore || P->is(tok::lessless) ||
(P->is(TT_BinaryOperator) &&
Style.BreakBeforeBinaryOperators != FormatStyle::BOS_None) ||
(P->is(TT_ConditionalExpr) && Style.BreakBeforeTernaryOperators);
OpenPOWER on IntegriCloud