I noticed that clang-format was inserting some strange indentation whenever I used custom "attribute-like macros"
(things like FOO_EXTERN to wrap attribute-visible-default, or macros with parentheses like NS_SWIFT_NAME(...)).
There are two parts to this fix:
- tokenize the paren after an AttributeMacro as a TT_AttributeParen
- treat a AttributeMacro-without-paren the same as one with a paren (eg, the FOO_EXTERN case)
I added a new test-case to differentiate a macro that is or is-not a AttributeMacro; also handled whether the
ColumnLimit is set to infinite (0) or a finite value, as part of this patch is in ContinuationIndenter.
There may be other places that need to handle TT_AttributeMacro better, but this is at least a step in the right
direction.