[PATCH] D93938: [clang-format] Fixed AfterEnum handling

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 31 07:04:02 PST 2020


MyDeveloperDay added a comment.

Take the following example:

  enum { A, B, C, D, E, F, G, H, I } Short;



  And the following minimal .clang-format
  ---
  ColumnLimit: 10
  BreakBeforeBraces: Custom
  BraceWrapping:
      AfterEnum: true

To use AfterEnum you must be using "Custom" for BreakBeforeBraces, the result is

  enum
  {
    A,
    B,
    C,
    D,
    E,
    F,
    G,
    H,
    I
  } Short;

changer AfterEnum to false and you have

  enum {
    A,
    B,
    C,
    D,
    E,
    F,
    G,
    H,
    I
  } Short;

Could you explain using this example what you think is wrong and why? what do you expect to see?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93938



More information about the cfe-commits mailing list