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

From: Joe Perches
Date: Sat Jan 19 2019 - 14:06:25 EST


On Sat, 2019-01-19 at 19:30 +0100, Miguel Ojeda wrote:
> Hi Jason,
>
> On Fri, Jan 18, 2019 at 11:57 PM Jason Gunthorpe <jgg@xxxxxxxxxxxx> wrote:
> > Re-run the shell fragment that generated the original list. In particular
> > this adds the missing xarray related functions.
> >
> > Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxxxx>
>
> Thank for the patch! Picking it up.

This misses all the directory/file specific #defines
outside of include/ with for_each

$ 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