Skip to content

Commit cba4801

Browse files
committed
[clang-format] Change the clang-format style to always break on template declarations.
Specifically, I am changin about is called BreakTemplateDeclarationsStyle from BTDS_No (the current value) to BTDS_Yes. The two differences are: ``` BTDS_No (in configuration: No) Do not force break before declaration. PenaltyBreakTemplateDeclaration is taken into account. template <typename T> T foo() { } template <typename T> T foo(int aaaaaaaaaaaaaaaaaaaaa, int bbbbbbbbbbbbbbbbbbbbb) { } ``` ``` BTDS_Yes (in configuration: Yes) Always break after template declaration. template <typename T> T foo() { } template <typename T> T foo(int aaaaaaaaaaaaaaaaaaaaa, int bbbbbbbbbbbbbbbbbbbbb) { } ``` If one looks at the code base, most templates already look like BTDS_Yes except for instances where clang-format performed it. Change the clang-format style to stop this from happening incrementally.
1 parent 9aed7ce commit cba4801

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

.clang-format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
BasedOnStyle: LLVM
2+
AlwaysBreakTemplateDeclarations: Yes

0 commit comments

Comments
 (0)