<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/56769>56769</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang-format non-idempotency with tabs in comment
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
kerrickstaley
</td>
</tr>
</table>
<pre>
When I re-format a file containing the following single line, and then re-format it a second time, it changes again the second time:
```
// ofMap(message.velocity, 0, 127, 0, ofGetWidth() * 0.2)
```
After the `//` there are 4 tab characters.
You can reproduce this by running the below commands. You can see from their output that there is a diff: the asterisk moves down a line.
```
$ echo -e '//\t\t\t\tofMap(message.velocity, 0, 127, 0, ofGetWidth() * 0.2)' | clang-format
// ofMap(message.velocity, 0, 127, 0, ofGetWidth() *
//0.2)
$ echo -e '//\t\t\t\tofMap(message.velocity, 0, 127, 0, ofGetWidth() * 0.2)' | clang-format | clang-format
// ofMap(message.velocity, 0, 127, 0, ofGetWidth()
//* 0.2)
```
This example was minimized from some real-world code. Although it's not representative of high-quality production code (it contains commented code), I think this is still a case that clang-format should handle correctly, because it does happen in the wild.
System info:
```
$ clang-format --version
clang-format version 14.0.6
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzFVEuP2yAQ_jX2Bdly8CP2wYc0q1Y99NRKqx6xGdt0MbiAk6a_vgNOt0nV7akPCWNghm9mPmam0_zSPk6gyFtiIBm0mZkjjAxCAum1ckwooUbiJiCDllKf_c7ihHIpFET0SJjiXkHdIAgPYgERUCTmoIZn_cTUCJawEXED6K1Ofoiyhyg7RFV2HduWvvYja56HHt6xJaL1DNayEdITSN0Ld_FWMj_t6P55rYc34B4FdxPeiGhDInogWUpx-Utzh8GBCb75o812lfkDA4ThVxDHOh-KYT2q2vQKE-aPeiU981QsRvO1B7woLOkuxKzqmcoOHT4jv_OM3NmUfL9lAWk2evZKwhC9umV1uGHuah-hGOFiGJCsgMQsuiDsE5n1CYnl-qxQw79M-gKZBYF-0iTB-DxLIb7y6G6_P8Yv3ZNofyS9xGe_psZfe9Nb4Lvn_d8R_xsK7kB_n-Hb_MHnJXxh84KlfGaWzFjqs_gKfEtBq2fANGYyOWsjOWYrh5QcpJv0Ok5YzRirJUq7kOtgAZuFEydAz8gkxin5vDKJ3pOtEJzQKmAgW7VvBVtzsaEK8C5sFgKHR-xGWDbqaSseHNYJKTGxe2Zhq4c7hi36hC5id-GhbxkDvZOBuA56tuIlNMk1VsjElgVb1bX9nIXkd_X7_oIFNaN40C_3o-LeepKcsA1gfJv8TnaVkF2RZmn1E14M7a4q66beNSWNeZvzJm9Y7IST0N7BKK0SwWFetAPVX9BvN_k2ZH0gVwbj1ch2cm6x3vOQCCOqrV2KCriR8vT9l-CbfEKKcCusXcHioqz2VRNPbZkNrOqzPK-BQs7Kouvqsqg7ltf5Pud1LBm2L9tG5auIUgVnEiBwHZUPsWhpRmm2p3VW7JrdLh2aqikr6HlRZx1URVRkMDMhU-9Hqs0Ymza41K2jRaEU1tkfQmatGBVAMIf4bMX8M-0TGCP6J-uYhEscHGhDAN8AWL0VJg">