================
@@ -391,6 +391,37 @@ TEST_F(DefinitionBlockSeparatorTest, Always) {
                Style, Prefix + Infix + Postfix);
 }
 
+TEST_F(DefinitionBlockSeparatorTest, AlwaysMaxEmptyLinesZeroAllman) {
+  FormatStyle Style = getLLVMStyle();
+  Style.BreakBeforeBraces = FormatStyle::BS_Allman;
+  Style.MaxEmptyLinesToKeep = 0;
+  Style.SeparateDefinitionBlocks = FormatStyle::SDS_Always;
+  Style.AllowShortFunctionsOnASingleLine = FormatStyle::ShortFunctionStyle();
+
+  constexpr StringRef Input = "int my_function(int a)\n"
+                              "\n"
+                              "{\n"
+                              "  return a;\n"
+                              "}\n"
+                              "int other_function(int a)\n"
+                              "\n"
+                              "{\n"
+                              "  return a;\n"
+                              "}\n";
----------------
HazardyKnusperkeks wrote:

```suggestion
                              "}";
```
We have no trailing line break in the test data.

https://github.com/llvm/llvm-project/pull/206406
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to