In https://github.com/dealii/dealii/pull/6656 some people requested to have inline on a separate line.
clang-format seems not to be capable of doing so, but likely accepts when this done some other way.
Should we have a separate script taking care of this?
I prefer to do this after introducing clang-format.
I've just posted #6661 for this -- easy enough to do this with this sort of perl expression:
perl -pi -e 's/^(\s*)inline\s+(.+)/\1inline\n\1\2/g;' include/deal.II/*/*h
I strongly disagree for two reasons:
inline int foo(int ffffffffffffffffffffffffffffffffffffffff_bar,
int ffffffffffffffffffffffffffffffffffffffff_baz,
int ffffffffffffffffffffffffffffffffffffffff_bar)
{
return 0;
}
Output:
int foo(int ffffffffffffffffffffffffffffffffffffffff_bar,
int ffffffffffffffffffffffffffffffffffffffff_baz,
int ffffffffffffffffffffffffffffffffffffffff_bar)
{
return 0;
}
.clang-format file into the source directory, every IDE and editor that supports clang-format should do the right thing.If everyone feels so strongly about having inline on a separate line, I suggest we simply wait a year until this is supported by clang-format. Or simply never switch. But PLEASE PLEASE PLEASE not again a set of hand-rolled perl regexs (like astyle) for indenting.
It looks like @tamiko has good arguments against, closing for now.
Most helpful comment
I strongly disagree for two reasons:
Output:
.clang-formatfile into the source directory, every IDE and editor that supports clang-format should do the right thing.If everyone feels so strongly about having
inlineon a separate line, I suggest we simply wait a year until this is supported byclang-format. Or simply never switch. But PLEASE PLEASE PLEASE not again a set of hand-rolled perl regexs (like astyle) for indenting.