Skip to content

Commit 5a1282b

Browse files
committed
Template specialization decls are different from template decls
1 parent 076fe27 commit 5a1282b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

force_cover.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class MyASTConsumer : public ASTConsumer {
9797
MyASTConsumer(Rewriter &R) : HandlerForTemplateClass(R), HandlerForTemplateFunction(R) {
9898

9999
// Match methods of templated classes
100-
Matcher.addMatcher(cxxMethodDecl(hasAncestor(classTemplateDecl())).bind("class"), &HandlerForTemplateClass);
100+
Matcher.addMatcher(cxxMethodDecl(anyOf(hasAncestor(classTemplateDecl()), hasAncestor(classTemplateSpecializationDecl()))).bind("class"), &HandlerForTemplateClass);
101101

102102
// Match templated functions
103103
Matcher.addMatcher(functionTemplateDecl().bind("fun"), &HandlerForTemplateFunction);

0 commit comments

Comments
 (0)