================
@@ -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:

Don't loop. Pick some values.

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

Reply via email to