[PATCH] D54628: Extend format with AllowShortEnumsOnASingleLine option

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 13 07:41:30 PST 2019


MyDeveloperDay added a comment.

I'm thinking this is the same as BraceWrapping.AfterEnum, if you think your use  case is covered would you consider Abandoning this revision so we know this functionality exists already, if not let work out what is missing

  if (Right.is(TT_InlineASMBrace))
    return Right.HasUnescapedNewline;
  if (isAllmanBrace(Left) || isAllmanBrace(Right))
    return (Line.startsWith(tok::kw_enum) && Style.BraceWrapping.AfterEnum) ||
           (Line.startsWith(tok::kw_typedef, tok::kw_enum) &&
            Style.BraceWrapping.AfterEnum) ||
           (Line.startsWith(tok::kw_class) && Style.BraceWrapping.AfterClass) ||
           (Line.startsWith(tok::kw_struct) && Style.BraceWrapping.AfterStruct);
  if (Left.is(TT_ObjCBlockLBrace) &&
      Style.AllowShortBlocksOnASingleLine == FormatStyle::SBS_Never)
    return true;


Repository:
  rC Clang

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

https://reviews.llvm.org/D54628





More information about the cfe-commits mailing list