[PATCH] D132256: [clang-format] Add DefinitionBlockSpacing option
Björn Schäpers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 19 12:40:37 PDT 2022
HazardyKnusperkeks added a comment.
Please run `clang/docs/tools/dump_format_style.py`.
================
Comment at: clang/include/clang/Format/Format.h:3189
+ /// to DefinitionBlockSpacing.
+ /// \version 15
+ unsigned DefinitionBlockSpacing;
----------------
This isn't going to land in 15.
================
Comment at: clang/include/clang/Format/Format.h:3190
+ /// \version 15
+ unsigned DefinitionBlockSpacing;
+
----------------
Please sort alphabetically.
================
Comment at: clang/unittests/Format/DefinitionBlockSeparatorTest.cpp:609
+ Style.DefinitionBlockSpacing = 2;
+ /// This has to be set, otherwise the extra lines will be removed
+ Style.MaxEmptyLinesToKeep = 2;
----------------
================
Comment at: clang/unittests/Format/DefinitionBlockSeparatorTest.cpp:610
+ /// This has to be set, otherwise the extra lines will be removed
+ Style.MaxEmptyLinesToKeep = 2;
+ verifyFormat("int foo(int i, int j) {\n"
----------------
Do we want to define the behavior of `MaxEmptyLinesToKeep < DefinitionBlockSpacing`? Then we need tests for that!
Tests with `MaxEmptyLinesToKeep < DefinitionBlockSpacing` and initially more than `DefinitionBlockSpacing` should definitely be there.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132256/new/
https://reviews.llvm.org/D132256
More information about the cfe-commits
mailing list