[PATCH] D136154: [clang-format] Fix the continuation indenter
MyDeveloperDay via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 19 04:28:45 PDT 2022
MyDeveloperDay added a comment.
Doesn't something like this achieve the same
CurrentState.Indent = State.Column;
CurrentState.LastSpace = State.Column;
- } else if ((Previous.isOneOf(TT_BinaryOperator, TT_ConditionalExpr,
- TT_CtorInitializerColon)) &&
+ } else if (Previous.is(TT_CtorInitializerColon)) {
+ CurrentState.LastSpace = State.Column;
+ } else if ((Previous.isOneOf(TT_BinaryOperator, TT_ConditionalExpr)) &&
((Previous.getPrecedence() != prec::Assignment &&
(Previous.isNot(tok::lessless) || Previous.OperatorIndex != 0 ||
Regardless of the choice of BreakBeforeBinaryOperators?
BTW I checked such a change passes all the other unit tests. (Beyonce rule!!)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136154/new/
https://reviews.llvm.org/D136154
More information about the cfe-commits
mailing list