================ @@ -0,0 +1,31 @@ +.. title:: clang-tidy - readability-use-std-min-max + +readability-use-std-min-max +=========================== + +Replaces certain conditional statements with equivalent ``std::min`` or ``std::max`` expressions, +improving readability and promoting the use of standard library functions. +Note: this transformation may impact performance in performance-critical code due to potential +additional stores compared to the original if statement. + +Examples: + +Before: + +.. code-block:: c++ + + void foo() { + int a, b; + if (a < b) + a = b; + } + ---------------- 11happy wrote:
sorry I am not able to get where is the bracket missing https://github.com/llvm/llvm-project/pull/77816 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits