<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/145196>145196</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[clang-tidy] Check request: readability-use-initializer-list-for-minmax
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-tidy
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
denzor200
</td>
</tr>
</table>
<pre>
Need a check that will find nested calls of `std::min` or `std::max`. The check will suggest to use overloaded for `std::initializer_list` versions.
BEFORE:
```
std::min(std::min(a, b), std::min(c, d));
```
AFTER:
```
std::min({a, b, c, d});
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyEks1unDAQx59muFigwYBZDj6wSTi2UpR7ZfAAbg1ObbPN5ukr0FZNtodKlkae8fz-ng8VgplWIgnVGarHRG1xdl5qWt-d54hJ7_RVfiHSTLFhpuEHi7OK7Jexlo1m1WylEEmzQVkbmBsZCAxRQ9FC0S5mBYHM-c9e9QYCM_Yy0w150MI2TRQii45tgZi7kLdOadJsvAOY1USjrHkn_82aEHeNC_lg3BoywBawPT91X5-f9ufYgsDbwfbT1_jp7qqAP7AeeLPbu9iw-_QRa6A433EB27Z7eXr-ryLU5z8qD-zGrB__ZSZaFropGpWQzOsKqwpFXSezHLEvS2zGWuTNWJ20FkIUw6h5jvl4UpQYyZFXKDhHxLKoM9U3pHN9ynHsOdEAJdKijM2svSyZ81NiQthI5mWVNyKxqicbjoXgfLBqndJo9BU43xfEyz0r7bcpQIl798NfTjTRHqv0Ia16ZA_HkD393ChEKFrmSWnVG2viNd0CpR8Gmu7IdHQ-Xcy6qLdk81bOMb6GvYu8A95NJs5bnw1uAd7t2jeTvnr3nYYIvDsKCsC7W00XyX8HAAD__yl54Gg">