[clang-tools-extra] [clang-tidy] Teach `modernize-type-traits` about more type traits (PR #147074)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 4 12:11:47 PDT 2025


================
@@ -38,3 +38,10 @@ Options
     #define IS_SIGNED(T) std::is_signed<T>::value
 
   Defaults to `false`. 
+
+Limitations
+-----------
+
+Does not currently diagnose uses of ``std::chrono::is_clock``,
+``std::chrono::treat_as_floating_point``, ``std::tuple_element``,
+or ``std::variant_alternative``.
----------------
vbvictor wrote:

Write more general description for future-proof.
Does not currently diagnose variadic type traits (e.g. ``std::tuple_element``) and type traits with nested namespace specifiers (e.g. ``std::chrono::is_clock``).

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


More information about the cfe-commits mailing list