HazardyKnusperkeks added inline comments.

================
Comment at: clang/lib/Format/ContinuationIndenter.cpp:812-814
+    if (Style.BreakBeforeBinaryOperators == FormatStyle::BOS_None ||
++       Style.BreakBeforeBinaryOperators == FormatStyle::BOS_NonAssignment)
       CurrentState.LastSpace = State.Column;
----------------
Add braces (and drop the plus).


================
Comment at: clang/unittests/Format/FormatTest.cpp:6599-6601
+  Style.AlignAfterOpenBracket = FormatStyle::BAS_AlwaysBreak;
+  Style.BinPackParameters = false;
+  Style.ContinuationIndentWidth = 2;
----------------
Do you need this for the observed effect? From the description I don't see that.


================
Comment at: clang/unittests/Format/FormatTest.cpp:6603
+  Style.BreakBeforeBinaryOperators = FormatStyle::BOS_NonAssignment;
+  EXPECT_EQ(
+      "struct Derived {\n"
----------------
Is the behavior different when the code is already formatted like you want it? 
(It shouldn't.) Then you should use `verifyFormat()`.


Repository:
  rG LLVM Github Monorepo

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
  • [PATCH] D136154: Fix the ... Henrik Lafrenz via Phabricator via cfe-commits
    • [PATCH] D136154: Fix... Björn Schäpers via Phabricator via cfe-commits

Reply via email to