[PATCH] D136154: [clang-format] Fix the continuation indenter
Owen Pan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 27 22:51:04 PDT 2022
owenpan added inline comments.
================
Comment at: clang/lib/Format/ContinuationIndenter.cpp:803-804
CurrentState.LastSpace = State.Column;
- } else if ((Previous.isOneOf(TT_BinaryOperator, TT_ConditionalExpr,
- TT_CtorInitializerColon)) &&
((Previous.getPrecedence() != prec::Assignment &&
----------------
owenpan wrote:
> HazardyKnusperkeks wrote:
> > Before it was followed with an `&&`, I don't know which one was for this case, and which one for the other, or for both. This is a bit hard, but maybe this is just to few checks?
> IMO we should make an NFC patch to clean this up before attempting to fix the bug: e.g. `TT_ConditionalExpr` and `TT_CtorInitializerColon` don't have `prec::Assignment`, aren't `tok::lessless`, etc.
Alternatively, we can fix the bug (except for assignment statements) by doing the above.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136154/new/
https://reviews.llvm.org/D136154
More information about the cfe-commits
mailing list