aboutsummaryrefslogtreecommitdiff
path: root/docs/tools/dump_ast_matchers.py
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2013-02-06 20:36:22 +0000
committerManuel Klimek <klimek@google.com>2013-02-06 20:36:22 +0000
commit415514d5fbc2761b7f2938aa9112b079249820d6 (patch)
tree317560e0edd34b305545de75fb25f4f25693d38a /docs/tools/dump_ast_matchers.py
parent15417ef20e3cda668351c67cc580587913f6bee8 (diff)
Cleanup of ASTMatcher macros and adding support for overloaded matchers.
This is in preparation for adding other overloaded matchers. This change alone is a net win in LOC. I went through all matchers and looked whether we could now encode them as macro, or simplify them with the matcher atoms that were not available before. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174540 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/tools/dump_ast_matchers.py')
-rw-r--r--docs/tools/dump_ast_matchers.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/tools/dump_ast_matchers.py b/docs/tools/dump_ast_matchers.py
index cd7ab0b74f..4ed6822be1 100644
--- a/docs/tools/dump_ast_matchers.py
+++ b/docs/tools/dump_ast_matchers.py
@@ -175,13 +175,14 @@ def act_on_decl(declaration, comment, allowed_types):
comment)
return
- m = re.match(r"""^\s*AST_(POLYMORPHIC_)?MATCHER(_P)?(.?)\(
+ m = re.match(r"""^\s*AST_(POLYMORPHIC_)?MATCHER(_P)?(.?)(?:_OVERLOAD)?\(
(?:\s*([^\s,]+)\s*,)?
\s*([^\s,]+)\s*
(?:,\s*([^\s,]+)\s*
,\s*([^\s,]+)\s*)?
(?:,\s*([^\s,]+)\s*
,\s*([^\s,]+)\s*)?
+ (?:,\s*\d+\s*)?
\)\s*{\s*$""", declaration, flags=re.X)
if m:
p, n, result, name = m.groups()[1:5]