llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[clang-tidy] add check to suggest replacement of nested std::min or std::max with initializer lists

Open sopyb opened this issue 11 months ago • 6 comments

closes #25340

Identifies cases where std::min or std::max is used to find the minimum or maximum value among more than two items through repeated calls. The check replaces these calls with a single call to std::min or std::max that uses an initializer list. This makes the code slightly more efficient.

sopyb avatar Mar 17 '24 16:03 sopyb