<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/77310>77310</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-format] No option to configure GCC-style attributes (17.06)
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-format
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
dertarr
</td>
</tr>
</table>
<pre>
Hello. Started using `clang-format` version `17.06` and noticed several strange issues. Here is one of them:
There is an option `BreakAfterAttributes` to configure handling C++11 style attributes such as `[[these_ones]]`. Unfortunately, this option doesn't work for GCC-style attributes such as `__attribute__((that_one))`. Even though GCC attributes are not a part of any C standard, they are still widely used, sometimes even with other compilers. It would be nice to have the same option for formatting GCC-style attributes as well. Or, maybe have `AttributeMacros` make impact on how `BreakAfterAttributes` parses source code to find and format attributes. There is no such thing as C++ attributes for C code, at least not before C23 standard.
PS. Also, it would be handy to have support for wildcards in `AttributeMacros`, for example `__attribute__((*))`.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8VE2P6jgQ_DXm0prIMRDgkAMwy7497If0ds-oEzexdxw7sjuw_PuVkxnejDRvpAiUxF1VXV1pTMl2nqgW64NYPy9wZBNirSkyxrhogr7X38i5UMB3xsikYUzWdyAq2Tr03dMlxB5ZVBKuFJMNPr8qN4Ws8jP0Gnxg25KGRFeK6CBxRN8R2JRGSgV8o5hvIHiCcAE21IvlXshnIV9__zavR9BDGPiV5BAJX_YXprhnjrYZmVLm5ABt8BfbjZHAoNcuCz4KdRDqUJaQ-O4I8FEDaWwNYMqYkw0HNpToHDwlsX7OVyUL-MdfQuTRI5O7C3UENln0LEcHSl6oDcMtxBe4hAi_Ho9PX1Gdz4_n57NQW6G2bJAzrVC7fGXWX67kgU0YO5MR32NhpOwtIAwYOVuH_g5HSIxeY9SzRrpPBxNb5-BmNbk7jImmtyn0xLanBJRpbpYNBDYUoQ39YB3FVMBvuafRaWgIvG0p-2vwShkbEvb05kFuek4DZ8M_7R8T3Mi5Av6MWUCP94ZmtGzJY46_YxvDNMweXwhsP2DLEDyYcPtq9APGlF0OY2wJ2qAntRfr9ZTEWd07PQU8ouXDPBw2WTymt8C8V587PE6wWTwyOMLE0xAauoRIcFTLh_8FzOn963sBe5dCrrHvzMzRvD_cTOMwhMgTx8063WLUCaz_3JeMlU_Sf9gPjn6SJ6H2P6K00PVS75Y7XFBdbuRqo5bLarsw9appm211kRupVqWqWlyXJZWSlFw3TbXbLWytpFrJUm7LVVnJTSG31XLVaJRrqZdqtRMrST1aVzh37YsQu8X0bdebzbKUC4cNuTRtGKU-LA2l8s6JdS57asYuiZV0NnH6AcSW3bSdPhSun-GP8Ja7D9_7p6kTajtvJLVbjNHVhnlIeceok1CnzrIZm6INvVCnTPz69zTE8C-1LNRpXlVCnaaO_g8AAP__cxG9KQ">