[PATCH] D154755: [clang-format] Fix formatting of if statements with BlockIndent
    Owen Pan via Phabricator via cfe-commits 
    cfe-commits at lists.llvm.org
       
    Thu Nov  9 14:45:21 PST 2023
    
    
  
owenpan added inline comments.
================
Comment at: clang/lib/Format/ContinuationIndenter.cpp:773-792
   if ((Style.AlignAfterOpenBracket == FormatStyle::BAS_AlwaysBreak ||
        Style.AlignAfterOpenBracket == FormatStyle::BAS_BlockIndent) &&
       (Previous.isOneOf(tok::l_paren, TT_TemplateOpener, tok::l_square) ||
        (Previous.is(tok::l_brace) && Previous.isNot(BK_Block) &&
         Style.Cpp11BracedListStyle)) &&
       State.Column > getNewLineColumn(State) &&
       (!Previous.Previous ||
----------------
This is getting out of hand. Consider writing a lambda with early returns.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154755/new/
https://reviews.llvm.org/D154755
    
    
More information about the cfe-commits
mailing list