[PATCH] D109557: Adds a BreakBeforeClosingParen option

Björn Schäpers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 24 13:33:42 PDT 2021


HazardyKnusperkeks requested changes to this revision.
HazardyKnusperkeks added a comment.
This revision now requires changes to proceed.

In D109557#3021312 <https://reviews.llvm.org/D109557#3021312>, @MyDeveloperDay wrote:

> FYI, this is a very aggressive change, I highly recommend you run this over a large code base before landing. to double check, here is one slight oddity which I cannot determine if its correct or not.
>
>   void foo() {
>       if (quitelongarg != (alsolongarg - 1)) { // ABC is a very longgggggggggggg comment
>         return;
>       }
>   }
>
> becomes
>
>   void foo() {
>     if (quitelongarg != (alsolongarg - 1)
>     ) { // ABC is a very longgggggggggggg comment
>       return;
>     }
>   }
>
>
>
>   BasedOnStyle: LLVM
>   BreakBeforeClosingParen: true
>
> That might be what you expect but I wasn't quite sure

That is at least not what is covered in the tests or documentation. I would think it only applies to function declarations and invocations.
So either adapt documentation and test coverage, or fix behavior (in which case the tests should be extended as well).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109557



More information about the cfe-commits mailing list