aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Norris <[email protected]>2022-05-06 18:01:06 +0200
committerMiguel Ojeda <[email protected]>2022-05-20 19:27:16 +0200
commit781121a7f6d11d7cae44982f174ea82adeec7db0 (patch)
tree8d1c44bf0758deb66c6e5997235c4eeda28fb672
parentd7f6604341c748f803810664d5603af22b84a8cc (diff)
clang-format: Fix space after for_each macros
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 [1] Link: https://lore.kernel.org/r/[email protected] [2] Link: https://lore.kernel.org/lkml/[email protected]/ [3] 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]>
-rw-r--r--.clang-format4
1 files changed, 2 insertions, 2 deletions
diff --git a/.clang-format b/.clang-format
index 2a4ddb8df856..9b87ea1fc16e 100644
--- a/.clang-format
+++ b/.clang-format
@@ -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