Skip to content

Commit 76f4967

Browse files
committed
Merge branch 'rs/clang-format-updates'
Custom control structures we invented more recently have been taught to the clang-format file. * rs/clang-format-updates: clang-format: include kh_foreach* macros in ForEachMacros
2 parents ccb74f5 + 1457dff commit 76f4967

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.clang-format

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,20 +149,25 @@ Cpp11BracedListStyle: false
149149

150150
# A list of macros that should be interpreted as foreach loops instead of as
151151
# function calls. Taken from:
152-
# git grep -h '^#define [^[:space:]]*for_each[^[:space:]]*(' \
153-
# | sed "s,^#define \([^[:space:]]*for_each[^[:space:]]*\)(.*$, - '\1'," \
154-
# | sort | uniq
152+
# git grep -h '^#define [^[:space:]]*for_\?each[^[:space:]]*(' |
153+
# sed "s/^#define / - '/; s/(.*$/'/" | sort | uniq
155154
ForEachMacros:
156-
- 'for_each_abbrev'
157155
- 'for_each_builtin'
158156
- 'for_each_string_list_item'
159157
- 'for_each_ut'
160158
- 'for_each_wanted_builtin'
159+
- 'hashmap_for_each_entry'
160+
- 'hashmap_for_each_entry_from'
161+
- 'kh_foreach'
162+
- 'kh_foreach_value'
161163
- 'list_for_each'
162164
- 'list_for_each_dir'
163165
- 'list_for_each_prev'
164166
- 'list_for_each_prev_safe'
165167
- 'list_for_each_safe'
168+
- 'strintmap_for_each_entry'
169+
- 'strmap_for_each_entry'
170+
- 'strset_for_each_entry'
166171

167172
# The maximum number of consecutive empty lines to keep.
168173
MaxEmptyLinesToKeep: 1

0 commit comments

Comments
 (0)