[PATCH] D136154: [clang-format] Fix the continuation indenter

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 19 04:19:58 PDT 2022


MyDeveloperDay added a comment.

I get why this fix works for you, but I don't agree that the fix is the correct one..

for example you don't have any BinaryOperators in that code, lets just say in my style I had

  BreakBeforeBinaryOperators: All

Then your fix wouldn't cover me and I'd get exactly the same issue, (but why should i)

  struct Foo {
    Foo(
      int firstArgWithLongName,
      int secondArgWithLongName,
      int thirdArgWithLongName,
      int fourthArgWithLongName)
        : Base(
          firstArgWithLongName,
          secondArgWithLongName,
          thirdArgWithLongName,
          fourthArgWithLongName) {}

The problem as I see it was that the original bug, highly constrained the cases where "CurrentState.LastSpace = State.Column;" to one particular style (which if it happens to be your style great but not if its not.


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

https://reviews.llvm.org/D136154



More information about the cfe-commits mailing list