[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 5 10:44:07 PST 2023


================
@@ -193,6 +193,13 @@ New checks
   replacing with ``starts_with`` when the method exists in the class. Notably,
   this will work with ``std::string`` and ``std::string_view``.
 
+- New :doc:`modernize-use-std-numbers
+  <clang-tidy/checks/modernize/use-std-numbers>` check.
+
+  Finds constants and function calls to math functions that can be replaced
+  with c++20's mathematical constants from the ``numbers`` header and
----------------
EugeneZelenko wrote:

Uppercase `C`. See https://en.cppreference.com.

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


More information about the cfe-commits mailing list