[clang-tools-extra] [clang-tidy] Add new check `readability-use-numeric-limits` (PR #127430)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Sun Jun 15 10:20:48 PDT 2025


================
@@ -0,0 +1,38 @@
+//===--- UseNumericLimitsCheck.h - clang-tidy -------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_USENUMERICLIMITSCHECK_H
+#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_READABILITY_USENUMERICLIMITSCHECK_H
+
+#include "../ClangTidyCheck.h"
+#include "../utils/IncludeInserter.h"
+
+namespace clang::tidy::readability {
+
+/// Replaces certain integer literals with equivalent calls to
+/// ``std::numeric_limits``.
----------------
vbvictor wrote:

Please sync this sentence with ReleaseNotes.rst.

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


More information about the cfe-commits mailing list