diff options
author | Manuel Klimek <klimek@google.com> | 2014-02-24 10:28:36 +0000 |
---|---|---|
committer | Manuel Klimek <klimek@google.com> | 2014-02-24 10:28:36 +0000 |
commit | 4f8f890ade6f36beff56d1c93014bb41fde64cf5 (patch) | |
tree | fe441d9ed58dc9f5f58007632a34ed1141e85915 /clang/docs/tools | |
parent | 4c32d16c766f01f6ef3f57c460a6a5317541a977 (diff) | |
download | bcm5719-llvm-4f8f890ade6f36beff56d1c93014bb41fde64cf5.tar.gz bcm5719-llvm-4f8f890ade6f36beff56d1c93014bb41fde64cf5.zip |
Fix docs generation for the AST matchers:
1. Move internal functions into ASTMatchersInternal.
2. Adapt dump_ast_matchers.py to the new VariadicOperatorMatcherFunc
signature.
3. Update the actual docs with the updated tool / code.
llvm-svn: 202017
Diffstat (limited to 'clang/docs/tools')
-rw-r--r-- | clang/docs/tools/dump_ast_matchers.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/clang/docs/tools/dump_ast_matchers.py b/clang/docs/tools/dump_ast_matchers.py index 564dc380d64..7f8751ea654 100644 --- a/clang/docs/tools/dump_ast_matchers.py +++ b/clang/docs/tools/dump_ast_matchers.py @@ -242,12 +242,17 @@ def act_on_decl(declaration, comment, allowed_types): # Parse Variadic operator matchers. m = re.match( - r"""^.*VariadicOperatorMatcherFunc\s*([a-zA-Z]*)\s*=\s*{.*};$""", + r"""^.*VariadicOperatorMatcherFunc\s*<\s*([^,]+),\s*([^\s>]+)\s*>\s* + ([a-zA-Z]*)\s*=\s*{.*};$""", declaration, flags=re.X) if m: - name = m.groups()[0] - add_matcher('*', name, 'Matcher<*>, ..., Matcher<*>', comment) - return + min_args, max_args, name = m.groups()[:3] + if max_args == '1': + add_matcher('*', name, 'Matcher<*>', comment) + return + elif max_args == 'UINT_MAX': + add_matcher('*', name, 'Matcher<*>, ..., Matcher<*>', comment) + return # Parse free standing matcher functions, like: |