| Issue |
168702
|
| Summary |
[clang-format]: `SeparateDefinitionBlocks` doesn't respect `MaxEmptyLinesToKeep`
|
| Labels |
clang-format
|
| Assignees |
|
| Reporter |
carljohnsonnewhampshire-hue
|
I have the following .clang-format config:
```
SeparateDefinitionBlocks: Always
MaxEmptyLinesToKeep: 2
```
The following C++ code:
```C++
struct A {};
struct B {};
```
Is formatted as:
```C++
struct A {};
struct B {};
```
Which is not what I intended or expected it to be formatted like with this config. I expected this code to be left as is, and obviously if there was no empty lines between A and B struct definitions, I would expect one empty line to be added between them, but not two empty lines to be collapsed into one empty line, given that I have `MaxEmptyLinesToKeep` set to `2`.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs