Fix formatting of macros that take types.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 16 May 2020 15:36:23 +0000 (11:36 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 16 May 2020 15:36:23 +0000 (11:36 -0400)
commit5e19d6df5ef407f1ca94ddbcfe4d3c1aa832fd3c
tree49725925ad0e01683fc8d68e770d83c3b506329c
parent93d76541520ce8c2d47d422c6c3f46648b6449f2
Fix formatting of macros that take types.

Previously, we would assume that a macro like IsA() in the following
example was a cast just because it mentions a known type between parens,
and that messed up the formatting of any binary operator that followed:

       if (IsA(outer_path, UniquePath) ||path->skip_mark_restore)

This change errs on the side of assuming that function-like macros are
similar to sizeof() and offsetof(), so that operators are formatted
correctly:

       if (IsA(outer_path, UniquePath) || path->skip_mark_restore)

Thomas Munro

Discussion: https://postgr.es/m/20200114221814.GA19630@alvherre.pgsql
indent.c