[clang-tools-extra] [clang-tidy] add modernize-use-constexpr check (PR #146553)

via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 9 14:44:38 PDT 2025


================
@@ -142,6 +142,11 @@ New checks
   Finds unscoped (non-class) ``enum`` declarations and suggests using
   ``enum class`` instead.
 
+- New :doc:`modernize-use-constexpr
+  <clang-tidy/checks/modernize/use-constexpr>` check.
+
+  Finds functions and variables that can be declared `constexpr`.
----------------
EugeneZelenko wrote:

```suggestion
  Finds functions and variables that can be declared ``constexpr``.
```

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


More information about the cfe-commits mailing list