[PATCH] D44609: [Clang-Format] New option BeforeLambdaBody to manage lambda line break inside function parameter call (in Allman style)

Manuel Klimek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 27 00:45:16 PDT 2018

klimek added inline comments.

Comment at: lib/Format/ContinuationIndenter.cpp:1307
+       (Style.BraceWrapping.BeforeLambdaBody && Current.Next != nullptr &&
+        Current.Next->is(TT_LambdaLSquare)));
   State.Stack.back().IsInsideObjCArrayLiteral =
klimek wrote:
> I think I misunderstood some of this the first time around (and thanks for bearing with me :) - iiuc we want to break for Allman even when there's only one nested block. I think I'll need to take another look when I'm back from vacation, unless Daniel or somebody else finds time before then (will be back in 1.5 weeks)
So, HasMultipleNestedBlocks should only be true if there are multiple nested blocks.
What tests break if you remove this change to HasMultipleNestedBlocks?

  rC Clang


More information about the cfe-commits mailing list