[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
Sat Jul 5 11:13:03 PDT 2025
================
@@ -130,6 +155,10 @@ static const llvm::StringSet<> TypeTraits = {
"result_of",
"invoke_result",
"type_identity",
+ "compare_three_way_result",
+ "common_comparison_category",
----------------
vbvictor wrote:
We usually don't care if there would be a warning inside system headers, we only check user-code. It's okay if internal implementation would give a warning - it is usually filtered out.
I've checked `common_type` and it works fine https://godbolt.org/z/9WjKse9fd. Maybe variadic templates were forgotten when the check was originally implemented. Could you add a test-case for it then and put back `tuple` and `variant`. In limitation, should be only nested namespaces left.
https://github.com/llvm/llvm-project/pull/147074
More information about the cfe-commits
mailing list