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

via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 16 21:24:00 PDT 2023


================
@@ -168,6 +168,12 @@ New checks
 
   Replace ``enable_if`` with C++20 requires clauses.
 
+- 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 ('numbers' header).
----------------
EugeneZelenko wrote:

Please use double back-ticks for `numbers`.

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


More information about the cfe-commits mailing list