[clang] [clang-tools-extra] [clang-tidy] Add new check: `readability-redundant-typename` (PR #161574)
Victor Chernyakin via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 8 08:26:46 PDT 2025
================
@@ -208,6 +208,13 @@ New checks
Detect redundant parentheses.
+- New :doc:`readability-redundant-typename
+ <clang-tidy/checks/readability/redundant-typename>` check.
+
+ Finds redundant uses of the ``typename`` keyword. Can be used
----------------
localspook wrote:
I've thought about that, and I'm a bit conflicted, but I think `readability` is still the right place. The way I see it, the check isn't _just_ about modernizing, since there are cases where `typename` is redundant even before C++20. I think of it as enforcing a version-agnostic rule (don't use `typename` unnecessarily), and it just so happens that the number of cases where the rule applies greatly expanded in C++20.
https://github.com/llvm/llvm-project/pull/161574
More information about the cfe-commits
mailing list