<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/68722>68722</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [clang-format] Improve support for AttributeMacro
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang-format
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          jaredgrubb
      </td>
    </tr>
</table>

<pre>
    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
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUk09vozwQxj-NuYwSgUkIHDik6YvUQ1Wpb1a7t8jgCbjyH9Yems23X5km3U3VlXYlC4SZZ-Y3Hj8iBNVbxJqt79j6PhETDc7XL8Kj7P3Utknr5LnutLD94ui8EQTSYbCMbwgGYaVGYEW6JfKqnQgfRecdK1JQFoTWQANCEAbhJM4BRIjBh4O4hh8OMdZEUQDGy9OgugFUAIPCBiAHaCYtCBmvltA4D_hDmFEj4zsY0CMIjxCcQaBB2T4ADTPiG-CFuPcoKCowjNgpofU58j21LzuWb1l6z9Lrs0gv6-2TN4w38N5deM_cI4GAMIoOoUU6IdrYq5lZSBkM75kXsTElGa-UVQTb_f754e7L_r_D43b3_MR4-Y3x6uNufvcP4tsD5eVlO65rnpt-2CpVltAfI30Y3KQl9A6cBUUB3MmCVhbfJJ9X_Ahym7Jx7lJvlaKVnxD8T2eNLN_CzunJ2K9K0gDBCK3Rx6l7_D4pj3DyYhyV7W_E-0EFUFaiJUEqUgfwOE916vV5-Tn4vPmHA7z8hL9p43pDElnnssorkWCdFVVRrVdVxZOhrjpZdce8EGUmi2y9wa4teLaSvNx0fJMXiap5yvMszdKs4HlaLotjhevsmLVpu85kWcR6Rii91PrVLJ3vExXChHVRbjhPtGhRh9mxnP_uTMZ59LCvo2zRTn1gq1SrQOFXIlKkZ7ffCNf38GBG714RwjSOzs_WgVtXJ5PX9UA0zld7HkWvaJjaZecM402scXktRu9esCPGm5k8MN7M8D8DAAD__5wsX1Q">