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

via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 11 10:51:48 PST 2024


================
@@ -224,6 +224,12 @@ New checks
   Recommends the smallest possible underlying type for an ``enum`` or ``enum``
   class based on the range of its enumerators.
 
+- New :doc:`readability-ConditionalToStdMinMax
+  <clang-tidy/checks/readability/ConditionalToStdMinMax>` check.
+
+  Replaces certain conditional statements with equivalent std::min or std::max expressions, 
----------------
EugeneZelenko wrote:

Please enclose `std::min` and `std::max` in double back-ticks (language constructs).

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


More information about the cfe-commits mailing list