]> Git Repo - linux.git/commitdiff
clang-format: Fix space after for_each macros
authorBrian Norris <[email protected]>
Fri, 6 May 2022 16:01:06 +0000 (18:01 +0200)
committerMiguel Ojeda <[email protected]>
Fri, 20 May 2022 17:27:16 +0000 (19:27 +0200)
Set SpaceBeforeParens to ControlStatementsExceptForEachMacros to not add
space between a for_each macro and the following parenthesis.  This
option is available since clang-format-11 [1] and is in line with the
checkpatch.pl rules [2].

I found that this patch has also been sent by Brian Norris some weeks
ago [3].

Link: https://clang.llvm.org/docs/ClangFormatStyleOptions.html
Link: https://lore.kernel.org/r/[email protected]
Link: https://lore.kernel.org/lkml/[email protected]/
Cc: Miguel Ojeda <[email protected]>
Cc: Tom Rix <[email protected]>
Signed-off-by: Brian Norris <[email protected]>
Co-developed-by: Mickaël Salaün <[email protected]>
Signed-off-by: Mickaël Salaün <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[Adjusted authorship as agreed]
Signed-off-by: Miguel Ojeda <[email protected]>
.clang-format

index 2a4ddb8df85673a2196510a60ce86f1d7cc8bb3c..9b87ea1fc16e9ca86cd0cfed7c8015f40e16f93f 100644 (file)
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
 #
-# clang-format configuration file. Intended for clang-format >= 10.
+# clang-format configuration file. Intended for clang-format >= 11.
 #
 # For more information, see:
 #
@@ -667,7 +667,7 @@ SpaceAfterTemplateKeyword: true
 SpaceBeforeAssignmentOperators: true
 SpaceBeforeCtorInitializerColon: true
 SpaceBeforeInheritanceColon: true
-SpaceBeforeParens: ControlStatements
+SpaceBeforeParens: ControlStatementsExceptForEachMacros
 SpaceBeforeRangeBasedForLoopColon: true
 SpaceInEmptyParentheses: false
 SpacesBeforeTrailingComments: 1
This page took 0.056302 seconds and 4 git commands to generate.