[clang-format] Improve support for AttributeMacro #68722
Closed
Description
clang-format doesn't handle AttributeMacro in all the same ways as __attribute__ macros (which is means to emulate). For example, here are some things that don't format great, especially in ObjC:
// Attributes don't get a space between them sometimes:
- (id)init ATTRIBUTE_MACRO(X)ATTRIBUTE_MACRO;
- (id)init ATTRIBUTE_MACRO(X)__attribute__((X));
// @interface should go on its own line
ATTRIBUTE_MACRO(X) ATTRIBUTE_MACRO @interface Foo
@end
// Style: ColumnWidth smaller to require wrapping
// This indentation is really ugly.
ATTRIBUTE_MACRO
ATTRIBUTE_MACRO(X)
@interface Foo
@end
Activity