diff options
author | Ander <github32@anderg.fastmail.com> | 2025-01-18 04:45:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-17 19:45:10 -0800 |
commit | e2402615a5a76d46a433dfcc1de10b38a1263c9d (patch) | |
tree | f1ad89f825f24d62a8fe518bd3a9533894628983 /clang/lib/Format/ContinuationIndenter.cpp | |
parent | b62e55803c52ca04093a0eea361407e849dc23e1 (diff) | |
download | llvm-e2402615a5a76d46a433dfcc1de10b38a1263c9d.zip llvm-e2402615a5a76d46a433dfcc1de10b38a1263c9d.tar.gz llvm-e2402615a5a76d46a433dfcc1de10b38a1263c9d.tar.bz2 |
[clang-format] Fix option `BreakBinaryOperations` for operator `>>` (#122282)
Fixes #106228.
Diffstat (limited to 'clang/lib/Format/ContinuationIndenter.cpp')
-rw-r--r-- | clang/lib/Format/ContinuationIndenter.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Format/ContinuationIndenter.cpp b/clang/lib/Format/ContinuationIndenter.cpp index 554b55f..c311dea 100644 --- a/clang/lib/Format/ContinuationIndenter.cpp +++ b/clang/lib/Format/ContinuationIndenter.cpp @@ -148,6 +148,7 @@ static bool startsNextOperand(const FormatToken &Current) { static bool mustBreakBinaryOperation(const FormatToken &Current, const FormatStyle &Style) { return Style.BreakBinaryOperations != FormatStyle::BBO_Never && + Current.CanBreakBefore && (Style.BreakBeforeBinaryOperators == FormatStyle::BOS_None ? startsNextOperand : isAlignableBinaryOperator)(Current); |