================
@@ -25609,6 +25611,51 @@ TEST_F(FormatTest, KeepEmptyLinesAtEOF) {
verifyFormat(Code, "int i;\n\n\n", Style);
}
+TEST_F(FormatTest, KeepEmptyLinesAtStartOfBlock) {
+ FormatStyle Style = getLLVMStyle();
+ Style.AllowShortFunctionsOnASingleLine =
+ FormatStyle::ShortFunctionStyle::setEmptyAndInline();
+ Style.KeepEmptyLines.AtStartOfBlock = true;
+ Style.MaxEmptyLinesToKeep = 2;
+
+ verifyFormat("void foo() {\n"
+ "\n\n"
----------------
HazardyKnusperkeks wrote:
```suggestion
"\n"
"\n"
```
Break each line in the test code, it's easier to read.
https://github.com/llvm/llvm-project/pull/224223
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits