================
@@ -18,9 +18,13 @@ using namespace clang::ast_matchers;
namespace clang::tidy::readability {
void RedundantTypenameCheck::registerMatchers(MatchFinder *Finder) {
- Finder->addMatcher(typeLoc(unless(hasAncestor(decl(isInstantiated()))))
- .bind("nonDependentTypeLoc"),
- this);
+ Finder->addMatcher(
+ typeLoc(loc(TypeMatcher(anyOf(typedefType(), tagType(),
+ deducedTemplateSpecializationType(),
+ templateSpecializationType()))),
+ unless(hasAncestor(decl(isInstantiated()))))
+ .bind("nonDependentTypeLoc"),
+ this);
----------------
ilovepi wrote:
The simpler matcher also seems to cut the overhead at runtime down
significantly. I'll need to re-run it again, but --enable-profile shows its
under ~3 seconds now. I'm a little concerned that file still takes a couple
minutes to finish reporting under C++20 and only 8 seconds under C++17, so it
could be that I held something wrong in my last evaluation.
https://github.com/llvm/llvm-project/pull/170540
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits