aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-02-19 11:28:36 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-02-19 11:28:39 +0100
commitf1c2f619a68733ad79658288cc9a3b866679bf08 (patch)
tree942f2fe5cb7345ae98588dca0c3bd59f1b02841e /src
parentf093310b2e18128c4b1c5be360d7c57223891741 (diff)
parent876ac3f6b62087fb5c22b0a477751895915d47b8 (diff)
downloadbitcoin-f1c2f619a68733ad79658288cc9a3b866679bf08.tar.xz
Merge #21221: [tools] Allow argument/parameter bin packing in clang-format
876ac3f6b62087fb5c22b0a477751895915d47b8 [tools] Allow argument/parameter bin packing in clang-format (John Newbery) Pull request description: clang-format documentation for BinPackArguments: If `false`, a function call’s arguments will either be all on the same line or will have one line each. ``` true: void f() { f(aaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa); } false: void f() { f(aaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa); } ``` https://clang.llvm.org/docs/ClangFormatStyleOptions.html#configurable-format-style-options There's no reason to forbid this format. Having multiple arguments or parameters per line can be just as readable as having one per line (and is certainly more readable than having extremely long lines). ACKs for top commit: laanwj: ACK 876ac3f6b62087fb5c22b0a477751895915d47b8 MarcoFalke: review ACK 876ac3f6b62087fb5c22b0a477751895915d47b8 vasild: ACK 876ac3f6b62087fb5c22b0a477751895915d47b8 Tree-SHA512: 7c401b4551b458c83dd70883860788b4a60e08a5399171fef27a2f5fdc6b933f6454fe0d396c32d826e3ab537791329da3275ae9b5e9ad36630a6dc2c167e88f
Diffstat (limited to 'src')
-rw-r--r--src/.clang-format3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/.clang-format b/src/.clang-format
index ef7a0ef5c7..a69c57f3e0 100644
--- a/src/.clang-format
+++ b/src/.clang-format
@@ -11,7 +11,8 @@ AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: false
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
-BinPackParameters: false
+BinPackArguments: true
+BinPackParameters: true
BreakBeforeBinaryOperators: false
BreakBeforeBraces: Custom
BraceWrapping: