[PATCH] D136154: [clang-format] Fix the continuation indenter
Henrik Lafrenz via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 19 02:43:18 PDT 2022
hel-ableton added a comment.
Adding two inline comments.
================
Comment at: clang/unittests/Format/FormatTest.cpp:6599-6601
+ Style.AlignAfterOpenBracket = FormatStyle::BAS_AlwaysBreak;
+ Style.BinPackParameters = false;
+ Style.ContinuationIndentWidth = 2;
----------------
HazardyKnusperkeks wrote:
> Do you need this for the observed effect? From the description I don't see that.
I think it's necessary for the test to work, otherwise the value would fall back to 4, I think? Would you prefer the test to be re-written with the default value, instead?
================
Comment at: clang/unittests/Format/FormatTest.cpp:6603
+ Style.BreakBeforeBinaryOperators = FormatStyle::BOS_NonAssignment;
+ EXPECT_EQ(
+ "struct Derived {\n"
----------------
HazardyKnusperkeks wrote:
> Is the behavior different when the code is already formatted like you want it? (It shouldn't.) Then you should use `verifyFormat()`.
Not sure I understand. Would you like the test to be re-written so that the code is already formatted like the result of the formatting?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136154/new/
https://reviews.llvm.org/D136154
More information about the cfe-commits
mailing list