[PATCH] D104222: [clang-format] [PR50702] Lamdba processing does not respect AfterClass and AfterNamespace

Francois JEAN via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 15 07:47:38 PDT 2021


Wawha added a comment.

In D104222#2819358 <https://reviews.llvm.org/D104222#2819358>, @MyDeveloperDay wrote:

> @Wawha your cases could be covered by the following (in mustBreakBefore)
>
>   if (Style.BraceWrapping.BeforeLambdaBody && Right.is(TT_LambdaLBrace) &&
>       Left.isOneOf(tok::star, tok::amp, tok::ampamp)) {
>     return true;
>   }
>
> As I think  its the presence of & and * that causes it to not wrap.
>
> By all means if you would prefer to commandeer the patch I'm ok with that. I was just on a bug fixing day. If you'd like to take this over and add the unit tests @christophe-calmejane suggest, I'm happy to be the reviewer

Indeed, & and * could be the root cause.
About fixing that, I won't have the time in the next days. It will take time for me to re-read and re-understand that code.
But I could find time to test patch or modification in my code to check that there is no regression.


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

https://reviews.llvm.org/D104222



More information about the cfe-commits mailing list