From c70fe599b6916c37fa0b1a3a756b8d016279582e Mon Sep 17 00:00:00 2001 From: hel Date: Tue, 18 Oct 2022 12:04:53 +0200 Subject: [PATCH] Fix ContinuationIndenter --- clang/lib/Format/ContinuationIndenter.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clang/lib/Format/ContinuationIndenter.cpp b/clang/lib/Format/ContinuationIndenter.cpp index e4610064ff7d..d10724fd2a50 100644 --- a/clang/lib/Format/ContinuationIndenter.cpp +++ b/clang/lib/Format/ContinuationIndenter.cpp @@ -809,7 +809,8 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState &State, bool DryRun, // Indent relative to the RHS of the expression unless this is a simple // assignment without binary expression on the RHS. Also indent relative to // unary operators and the colons of constructor initializers. - if (Style.BreakBeforeBinaryOperators == FormatStyle::BOS_None) + if (Style.BreakBeforeBinaryOperators == FormatStyle::BOS_None || ++ Style.BreakBeforeBinaryOperators == FormatStyle::BOS_NonAssignment) CurrentState.LastSpace = State.Column; } else if (Previous.is(TT_InheritanceColon)) { CurrentState.Indent = State.Column; -- 2.36.1