================ @@ -0,0 +1,23 @@ +.. title:: clang-tidy - readability-use-numeric-limits + +readability-use-numeric-limits +============================== + + Replaces certain integer literals with equivalent calls to + ``std::numeric_limits<T>::min()`` or ``std::numeric_limits<T>::max()``. + +Before: + +.. code-block:: c++ + + void foo() { + int32_t a = 2147483647; + } + +After: + +.. code-block:: c++ + + void foo() { + int32_t a = std::numeric_limits<int32_t>::max(); + } ---------------- vbvictor wrote:
Add `IncludeStyle` option to docs as in other checks. https://github.com/llvm/llvm-project/pull/127430 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits