[PATCH] D114583: [clang-format] Adjust braced list detection

Krasimir Georgiev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 13 02:54:17 PST 2021


krasimir added a comment.

It appears that this regressed the formatting of initializer lists in some cases:

  # Before
  % cat ~/test.cc
  class A {
    A() : a{} {}
  
    A(int b) : b(b) {}
  
    A(int a, int b) : a(a), bs{{bs...}} {
      f();
    }
  
    int a, b;
  };
  
  # After
  % build/bin/clang-format -style=google ~/test.cc
  class A {
    A() : a {}
    {}
  
    A(int b) : b(b) {}
  
    A(int a, int b) : a(a), bs {
      { bs... }
    }
    { f(); }
  
    int a, b;
  };

@cpplearner  could you please take a look?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114583



More information about the cfe-commits mailing list