<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/121613>121613</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-tidy] readability-use-std-min-max drops comments
</td>
</tr>
<tr>
<th>Labels</th>
<td>
bug,
clang-tidy
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
LegalizeAdulthood
</td>
</tr>
</table>
<pre>
Suppose you have the following code:
```
if (box_depth > max_depth) // limit the depth to max
{
box_depth = max_depth;
}
```
after applying readability-use-std-min-max, the code is:
```
box_depth = std::min(box_depth, max_depth);
```
the explaining comment is dropped.
The expected code is:
```
box_depth = std::min(box_depth, max_depth); // limit the depth to max
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyUk0GPmzAQhX-NuVhEZowhHHzIbppTb-29MngCrgxG2KSb_vrKDm3parXVWpaQ0ePN92aM8t70E6Ik4omIc6bWMLhFfsZeWfMTT3q1YXBOZ63Td_llnWfnkd7dSgd1QxoGpFdnrfthpp52TiPhJ8LSrti22Yluy1wpgWPrXr5pnMNACf9ER7WdCDSUwIXAhVozmpDMH7rgomxnROqn3Smuvel5Z8qTkNTnV0iEndQ14ELVPNt7pF9QadUaa8I9Xz3mPuh8NFMeK8NzookBqfFvZ_yXwAcdZfw0mmmfOVrtIz8AX5HFWvgyW2WmR1_HEadAjad6cfOM-vDQfX3osAuo34d7s0sfYPzvZP5Uy7TkuuGNylAWNRdNeSwblg3yWFVCY11XBYIqRNOU-qi0FghQ8fKqMiOBgWAF48BFKdih4qCU5k1Z1I3qrkdSMhyVsQdrb-PBLX1mvF9RFlBUBc-satH6dJMB2rUnAASeCUBn1dTnweh7fCXO2SKjQ96uvScls8YH_9czmGDT_7D7TJzfux5pKv73mHy2LlYOIcxpFqlvvQnD2h46NxK4xErbI58X9x27QOCSongCly3NTcKvAAAA__-mEBmv">