diff options
Diffstat (limited to 'clang/docs/tools')
-rw-r--r-- | clang/docs/tools/dump_ast_matchers.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/docs/tools/dump_ast_matchers.py b/clang/docs/tools/dump_ast_matchers.py index c2fdcc28834..104189c4af3 100644 --- a/clang/docs/tools/dump_ast_matchers.py +++ b/clang/docs/tools/dump_ast_matchers.py @@ -264,6 +264,16 @@ def act_on_decl(declaration, comment, allowed_types): add_matcher('*', name, 'Matcher<*>', comment) return + # Parse Variadic functions. + m = re.match( + r"""^.*llvm::VariadicFunction\s*<\s*([^,]+),\s*([^,]+),\s*[^>]+>\s* + ([a-zA-Z]*)\s*=\s*{.*};$""", + declaration, flags=re.X) + if m: + result, arg, name = m.groups()[:3] + add_matcher(result, name, '%s, ..., %s' % (arg, arg), comment) + return + # Parse Variadic operator matchers. m = re.match( r"""^.*VariadicOperatorMatcherFunc\s*<\s*([^,]+),\s*([^\s>]+)\s*>\s* |