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

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 15 07:23:36 PDT 2021


MyDeveloperDay added a comment.

@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


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

https://reviews.llvm.org/D104222



More information about the cfe-commits mailing list