================ @@ -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}) { ---------------- jamesg-nz wrote:
Now testing ColumnLimit = 0 once separately. Unrolled remaining loop (that doesn't test = 0) into two verifications. Loops make it hard to see in test results for what value it is failing for, I guess. Although saw other people had used them in that file. 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