================ @@ -22965,6 +22965,84 @@ TEST_F(FormatTest, EmptyLinesInLambdas) { "};"); } +TEST_F(FormatTest, BreakBeforeLambdaBodyWrapping) { + verifyFormat("connect([]() {\n" + " foo();\n" + " bar();\n" + "});"); + + auto Style = getLLVMStyle(); + Style.BreakBeforeBraces = FormatStyle::BS_Custom; + Style.BraceWrapping.BeforeLambdaBody = true; + + verifyFormat("connect(\n" + " []()\n" + " {\n" + " foo();\n" + " bar();\n" + " });", + Style); + + for (unsigned l : {0, 41}) { ---------------- HazardyKnusperkeks wrote:
They make it hard to see which is failing, yes. But also why introduce additional runtime for the tests, if there is no real gain? https://github.com/llvm/llvm-project/pull/76673 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits