<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/131145>131145</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Clang-format failed to format code blocks in comments when it is too long
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-format
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Evian-Zhang
</td>
</tr>
</table>
<pre>
Example:
Original code:
```c
/**
* @code
* char *a_very_very_very_long = "which makes it need to enter another line to fix";
* if (foo > 1) {
* return;
* }
* @endcode
*/
int foo = 0;
```
After formatting:
```c
/**
* @code
* char *a_very_very_very_long = "which makes it need to enter another line to
* fix"; if (foo > 1) { return;
* }
* @endcode
*/
int foo = 0;
```
The clang-format version is `Ubuntu clang-format version 19.1.7 (++20250114103320+cd708029e0b2-1~exp1~20250114103432.75)`.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJzMUz2TozgQ_TVN0mVKahkDAYF9HqeX3CWbbAkhQDtCcknCM5PMb9-S7ZlxsBtu1VJdgJr-eq8fMkYzOa07qA5QHQu5ptmH7ulipNt8m6Wbit4Pb93Tq1zOVoPYA8v2bzCTcdKi8sOXF3bsZiof6AS0z8b2CLRH2LJr9P2oZhnyi_x-0eHt4Wa9mxDEEYHoZTZqxkU-64gmodN6wORRu6QDSufTrANa43T2juYViEAcPlqYEYGa0XsE8YQcqEWoP7_mK-i0BveQAvXxYV7thoeRMyK2Ny7hreQR2S3zE_eNhv2Ypxt9WGRKxk1_CT8fhT9p-g0_f4aU_2aNyko3bW7E4EWHaLxDExF27P9-dWn9dQRvS17WeVSgA9CBGFWM8y1nQhADOqihZg2jVrOeNvxdv575-0PQVlBZV0At7FhZDJ0YWtHKQne83vKm3hKnYu5qRs1ISkjd1y3jux0TSquWeF0zqtqhMN21puCCi2pXUclb2TRDMyoSbOSNytws0tjS2stS-jAVJsZVd1xwvq0KK3tt4_VPI3oEmrdRHYvQ5bxNv04RtsyamOJXpWSS1d0_j_SM0tjbuu-OvBXsrVfPEY1D5ZdFuxTxZdYuq8NETN5j1k-xBtvNKZ1jFmdW4mkyaV77UvkF6JT73h-bc_A_tEpApyucCHS6I7p09DMAAP__Fx09tg">