Re: [PATCH] clang-format: Update .clang-format with the latest for_each macro list

From: Miguel Ojeda
Date: Sat Jan 19 2019 - 14:42:09 EST

Hi Joe,

On Sat, Jan 19, 2019 at 8:06 PM Joe Perches <joe@xxxxxxxxxxx> wrote:
> This misses all the directory/file specific #defines
> outside of include/ with for_each

Indeed, the command only searches the include/ directory, but when
searching for the entire tree, it returns ~500 more entries (vs. the
~300 original ones). I cannot recall if there was a reason to search
only inside include/, though.

> $ git grep "#define.*for_each" | grep -v '^include' | wc -l
> 619
> Is it possible to make this generic somehow instead?
> Perhaps extend .clang_format with regexes?
> (?:[a-z0-9_]+_)?for_each(?:_[a-z_]+)
> [a-z0-9_]+_for_each

What do you mean?