[clang-tools-extra] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

Piotr Zegar via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 11 11:06:43 PST 2024


https://github.com/PiotrZSL commented:

Some tweaks needed. Note that there is also issue for:
```
std::max(a, std::max(b, c)) -> std::max({a, b, c})
```
and this check would be nice thing for that also, but not under this PR.

Overall you got something that works, but is very strict, now I would like to see it to become more .. generic and could land.

https://github.com/llvm/llvm-project/pull/77816


More information about the cfe-commits mailing list