Wawha added inline comments.
================ Comment at: lib/Format/TokenAnnotator.cpp:627 } + if(Style.BraceWrapping.BeforeLambdaBody && Current->is(TT_LambdaLSquare)) { + ++Left->BlockParameterCount; ---------------- klimek wrote: > Why do we want to increase the parameter count here? Specifically, why is it > not enough to || this condition to the first is in the function? I'm not sure to understand. You want to move this test in the first "if" of updateParameterCount()? Like : ``` if ((Current->is(tok::l_brace) && Current->BlockKind == BK_Block) || Style.BraceWrapping.BeforeLambdaBody && Current->is(TT_LambdaLSquare)) ++Left->BlockParameterCount; ``` If it's the case, doing that won't work, because updateParameterCount() is call only for brace, not square, so the condition while be true only once and the BlockParameterCount while be equal to 1. And ContinuationIndenter::moveStatePastScopeOpener() while require a value greater than 1 to flag true 'HasMultipleNestedBlocks'. Same for ParameterCount. I had this code because I was thinking that you want me to have this BlockParameterCount equal to 2 in case a lambda is alone inside a function. Repository: rC Clang https://reviews.llvm.org/D44609 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits