<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/58102>58102</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-format] Add an option to configure C++ attributes
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-format,
new-feature
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
cjdb
</td>
</tr>
</table>
<pre>
When there are too many attributes, functions tend to get formatted like this:
```cpp
[[attr1, attr2, attr3, attr4]] __keyword_attr constexpr void
f(args...);
```
It'd be nice if this were configurable, so that we could also have
```cpp
// option 1
[[attr1, attr2, attr3, attr4]] __keyword_attr
constexpr void f(args...);
// option 2
[[attr1, attr2, attr3, attr4]]
__keyword_attr constexpr void f(args...);
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJylUtuu2yAQ_Br8gmJhfInz4IfkRJH6BX2MMKxtziHGApw0f9_FrtWeqqlUVVoE7MIwM2xr1bP5OsBIwwAOqMARrKU3MT6pCMHpdg7gCX-j3TzKoO3oaYBR4SnaQ6CddTc8B4oa_YF3B-1JfiTsTNiRVGwNOU0_MuUJI-JmETIu-LbIt0VByjMGvV4_4PmwTl1jlkp8OsC3ydG71WrF6wivhet9mqaEH0h--u3hdfslEL5XtAU6aglUdwtN-oiCEbXT_exEayAS8BaLImARS7NRVBhMDeIOLzXxCwa1UzSHZv8tdAX4rJa-EvoHBvzfGaw3_ur3SwabHwk0WVUVVZVXRZ2oJleH_CCSoIOBBplII8Z-t7ZLFH1U6O24kcZu2n4C6BvhJ4xf-i-ZnWmGEKaluRa5vQ7D3KbS3nBjzH2bdpOz7yDxyy_a-zn27qWsM8aToRHVvsgEZ0yWooWcMc7z6tBJ2ZZ7XhxkYjBtfKRLOP_EmC_m4TTCY9eBCEg0JstzohuOQBljGcIVrE5zKUrZqXzfZqyAWpGCwU1ok0Z-qXV94pqFajv3HotG--B_FoX3uh9hcS3iizkM1jXyXbXJIqlZ9HwH9i8k0w">