[clang] [llvm] [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
Mon Jan 22 11:03:54 PST 2024
================
@@ -241,6 +241,12 @@ New checks
Detects C++ code where a reference variable is used to extend the lifetime
of a temporary object that has just been constructed.
+- New :doc:`readability-use-std-min-max
+ <clang-tidy/checks/readability/use-std-min-max>` check.
+
+ Replaces certain conditional statements with equivalent ``std::min`` or
+ ``std::max`` expressions.
----------------
PiotrZSL wrote:
sync this with documentation
https://github.com/llvm/llvm-project/pull/77816
More information about the cfe-commits
mailing list