aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Format/ContinuationIndenter.cpp
diff options
context:
space:
mode:
authorOwen Pan <owenpiano@gmail.com>2025-07-20 19:01:46 -0700
committerGitHub <noreply@github.com>2025-07-20 19:01:46 -0700
commit06ed4d2c92ef7785f6c39e567b8bdefd2defdedb (patch)
tree5749cf9ff9e3140bf3f3f143826beaa6799360ae /clang/lib/Format/ContinuationIndenter.cpp
parent22ef58ceda9490184f084fe1f938d333ba5d6cfd (diff)
downloadllvm-06ed4d2c92ef7785f6c39e567b8bdefd2defdedb.zip
llvm-06ed4d2c92ef7785f6c39e567b8bdefd2defdedb.tar.gz
llvm-06ed4d2c92ef7785f6c39e567b8bdefd2defdedb.tar.bz2
[clang-format] Fix a bug in `BreakBeforeBinaryOperators: All` (#149695)
Fixes #149520
Diffstat (limited to 'clang/lib/Format/ContinuationIndenter.cpp')
-rw-r--r--clang/lib/Format/ContinuationIndenter.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Format/ContinuationIndenter.cpp b/clang/lib/Format/ContinuationIndenter.cpp
index 4010f7f..bf67f9e 100644
--- a/clang/lib/Format/ContinuationIndenter.cpp
+++ b/clang/lib/Format/ContinuationIndenter.cpp
@@ -560,6 +560,7 @@ bool ContinuationIndenter::mustBreak(const LineState &State) {
return true;
}
} else if (Current.is(TT_BinaryOperator) && Current.CanBreakBefore &&
+ Current.getPrecedence() != prec::Assignment &&
CurrentState.BreakBeforeParameter) {
return true;
}