Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-07-26 00:27:14 +0300
committerJunio C Hamano <gitster@pobox.com>2019-07-26 00:27:14 +0300
commit27e4131bdd0de5e02bb710e91f01de34e7e39903 (patch)
treefe67317b739ec1ed43d5bc0cabe81d3d498258f6
parentd7267d55ef03c5b496901e2addf2f0a5da0f9cc3 (diff)
parentfc7e03aace379c3d6b00ac977447f115421324fe (diff)
Merge branch 'mo/clang-format-for-each-update' into maint
The list of for-each like macros used by clang-format has been updated. * mo/clang-format-for-each-update: clang-format: use git grep to generate the ForEachMacros list
-rw-r--r--.clang-format17
1 files changed, 15 insertions, 2 deletions
diff --git a/.clang-format b/.clang-format
index 41d4cd23fd..c592dda681 100644
--- a/.clang-format
+++ b/.clang-format
@@ -148,8 +148,21 @@ SpacesInSquareBrackets: false
Cpp11BracedListStyle: false
# A list of macros that should be interpreted as foreach loops instead of as
-# function calls.
-ForEachMacros: ['for_each_string_list_item', 'for_each_wanted_builtin', 'for_each_builtin', 'for_each_ut']
+# function calls. Taken from:
+# git grep -h '^#define [^[:space:]]*for_each[^[:space:]]*(' \
+# | sed "s,^#define \([^[:space:]]*for_each[^[:space:]]*\)(.*$, - '\1'," \
+# | sort | uniq
+ForEachMacros:
+ - 'for_each_abbrev'
+ - 'for_each_builtin'
+ - 'for_each_string_list_item'
+ - 'for_each_ut'
+ - 'for_each_wanted_builtin'
+ - 'list_for_each'
+ - 'list_for_each_dir'
+ - 'list_for_each_prev'
+ - 'list_for_each_prev_safe'
+ - 'list_for_each_safe'
# The maximum number of consecutive empty lines to keep.
MaxEmptyLinesToKeep: 1