@@ -25,18 +25,18 @@ void RedundantTypenameCheck::registerMatchers(MatchFinder *Finder) {
25
25
return ;
26
26
27
27
const auto InImplicitTypenameContext = anyOf (
28
- hasParent (typedefNameDecl ()), hasParent (templateTypeParmDecl ()),
29
- hasParent (nonTypeTemplateParmDecl ()), hasParent (cxxNamedCastExpr ()),
30
- hasParent (cxxNewExpr ()), hasParent (friendDecl ()), hasParent (fieldDecl ()),
31
- hasParent (
28
+ hasParent (decl (anyOf (
29
+ typedefNameDecl (), templateTypeParmDecl (), nonTypeTemplateParmDecl (),
30
+ friendDecl (), fieldDecl (),
32
31
varDecl (hasDeclContext (anyOf (namespaceDecl (), translationUnitDecl ())),
33
- unless (parmVarDecl ()))),
34
- hasParent (parmVarDecl (hasParent (expr (requiresExpr ())))),
35
- hasParent (parmVarDecl (hasParent (typeLoc (hasParent (
36
- namedDecl (anyOf (cxxMethodDecl (), hasParent (friendDecl ()),
37
- functionDecl (has (nestedNameSpecifier ()))))))))),
38
- // Match return types.
39
- hasParent (functionDecl (unless (cxxConversionDecl ()))));
32
+ unless (parmVarDecl ())),
33
+ parmVarDecl (hasParent (expr (requiresExpr ()))),
34
+ parmVarDecl (hasParent (typeLoc (hasParent (
35
+ decl (anyOf (cxxMethodDecl (), hasParent (friendDecl ()),
36
+ functionDecl (has (nestedNameSpecifier ())))))))),
37
+ // Match return types.
38
+ functionDecl (unless (cxxConversionDecl ()))))),
39
+ hasParent (expr (anyOf (cxxNamedCastExpr (), cxxNewExpr ()))));
40
40
Finder->addMatcher (typeLoc (InImplicitTypenameContext).bind (" typeloc" ), this );
41
41
}
42
42
0 commit comments