owenpan added inline comments.

================
Comment at: clang/lib/Format/ContinuationIndenter.cpp:803-808
-  } 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 ||
                 Previous.NextOperator)) ||
               Current.StartsBinaryExpression)) {
----------------
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.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136154/new/

https://reviews.llvm.org/D136154

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to