[PATCH] D33029: [clang-format] add option for dangling parenthesis

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 14 03:14:35 PDT 2021


MyDeveloperDay added a subscriber: csmulhern.
MyDeveloperDay added a comment.

I understand the frustration (I'm not convinced that its Phabricators fault to be honest, that's our process and plenty of people follow it without issues) , Our incredible original code owners have moved on to do I assume other things (rightly so as their contribution was already massive) and we are trying to hold the fort. But waiting for them to comment might mean you are waiting a long time.

We are tracking this work  via D109557: Adds a BreakBeforeClosingParen option <https://reviews.llvm.org/D109557> which was an attempt to resuscitate this request. Honestly I'm crateful to @csmulhern for taking it on.

As this current review D33029 <https://reviews.llvm.org/D33029> is 3 years since the last diff its hideously out of date and won't merge cleanly, It also is completely lacking in unit tests and that was always a massive "no-no"

I recommend we put our efforts into getting D109557 <https://reviews.llvm.org/D109557> over the line? given that they have addressed those issues (I have given it an "Accept")

I'm was not a massive fan of  the term `DanglingParenthesis` as a technical directive, and think `BreakBeforeClosingParen` from D109557 <https://reviews.llvm.org/D109557> is a better name.

I have some reservations about the `)` moving too much in my view on an if etc.. but as long as we can get a consensus as to what you all (I say all as this has 87 subscribers!) expect it to do I'm ok (as I won't be using this personally, I don't feel my opinion matters that much other than from a maintenance perspective! but I need those of you that will to comment if you don't like what its trying to do)

A good set of unit tests really helps to flesh this out.

  void foo() {
    if (quitelongarg != (alsolongarg - 1)
    ) { // ABC is a very longgggggggggggg comment
      return;
    }
  }

Its definitely not about about LLVM leaving good will on the table, its about having people being persistent enough to push it over the line (which believe me I recognize is difficult because lots of us have other jobs and do this in free time)

Contributors need to remain at the table long enough to finish the meal. There is a support burden that has to be considered especially 6 months down the line when the feature gets branched out and exposed to the masses,

But to be honest its not fair on those of us trying to look after it to just rock up every 6 months and ask why we've not pushed your feature over the line for you. You contribution is appreciated, but I would rather people hung out here a little longer.

My 2c worth.


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

https://reviews.llvm.org/D33029



More information about the cfe-commits mailing list