Skip to content

Commit 97ea315

Browse files
committed
[AstMatcher]templateArgumentCountIs support FunctionDecl
`hasTemplateArgument` and `templateArgumentCountIs` are always used together. It is more convenient to make then support `FunctionDecl`.
1 parent ca39210 commit 97ea315

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

clang/include/clang/ASTMatchers/ASTMatchers.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,6 +1090,7 @@ AST_POLYMORPHIC_MATCHER_P2(
10901090
AST_POLYMORPHIC_MATCHER_P(
10911091
templateArgumentCountIs,
10921092
AST_POLYMORPHIC_SUPPORTED_TYPES(ClassTemplateSpecializationDecl,
1093+
VarTemplateSpecializationDecl, FunctionDecl,
10931094
TemplateSpecializationType),
10941095
unsigned, N) {
10951096
return internal::getTemplateSpecializationArgs(Node).size() == N;

0 commit comments

Comments
 (0)