[PATCH] D91949: [clang-format] Add BeforeStructInitialization option in BraceWrapping configuration
    MyDeveloperDay via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Sat May  8 02:59:08 PDT 2021
    
    
  
MyDeveloperDay added a comment.
I'd like @curdeius input, my concern is its too simplistic and won't cover all the uses cases
  if (FormatTok->Tok.is(tok::equal) &&
        Style.BraceWrapping.BeforeStructInitialization) {
      nextToken();
      addUnwrappedLine();
    } else if (FormatTok->Tok.is(tok::l_brace)) {
I don't see how this change won't try and change other code (not just structs, but maybe it would impact classes and braced initialization too? (not sure about that), but perhaps I'm missing something. It tough for us sometimes to put our names to this as reviewers without understanding the implications to other code, but in principle, I'm not opposed to this idea just nervous we'll break other things
As its off by default I guess its not terrible. If the others are ok with this, I'd be happy to mark it good.
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91949/new/
https://reviews.llvm.org/D91949
    
    
More information about the cfe-commits
mailing list