Typz added a comment.

we are using this style at our company, not sure if it is used elsewhere; I 
will check.

however, it seems to me that this behavior does not match the name of the 
option : AlignOperands does not align the operands anymore when 
BreakBeforeBinaryOperators is set...
so, for this patch to go forward, should I change AlignOperands into 
OperandAlignment enum, with 3 options? Something like

- OA_NotAligned, same as AlignOperands=false
- OA_AlignOperator, same the current AlignOperands=true
- OA_AlignOperands, same as AlignOperands=true when 
BreakBeforeBinaryOperators=false but my "new" mode when 
BreakBeforeBinaryOperators=true



================
Comment at: unittests/Format/FormatTest.cpp:2476
       "bool value = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n"
-      "                     + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n"
-      "                     + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n"
-      "                 == aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n"
-      "                            * bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\n"
-      "                        + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\n"
-      "             && aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n"
-      "                        * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n"
-      "                    > ccccccccccccccccccccccccccccccccccccccccc;",
+      "                   + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n"
+      "                   + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n"
----------------
djasper wrote:
> This looks very inconsistent to me.
not sure what you mean, I do not really understand how this expression was 
aligned before the patch...
it is not so much better in this case with the patch, but the '&&' is actually 
right-aligned with the '=' sign.


https://reviews.llvm.org/D32478



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

Reply via email to