diff options
author | Samuel Benzaquen <sbenza@google.com> | 2016-05-04 20:45:00 +0000 |
---|---|---|
committer | Samuel Benzaquen <sbenza@google.com> | 2016-05-04 20:45:00 +0000 |
commit | a4076ea8a26dc837ee1321de2713d2d35ffad609 (patch) | |
tree | ba0d4b4812f462a0eed75089af415924a7e18460 /clang/docs/tools/dump_ast_matchers.py | |
parent | baf7fd0b162864409b16b18086efc2151233b646 (diff) | |
download | bcm5719-llvm-a4076ea8a26dc837ee1321de2713d2d35ffad609.tar.gz bcm5719-llvm-a4076ea8a26dc837ee1321de2713d2d35ffad609.zip |
Fix the doc extraction script to work with hasAnyName and with equalsNode.
The change from llvm::VariadicFunction to internal::VariadicFunction
broke the extraction of hasAnyName().
equalsNode was broken because the argument type is 'const XXXX*' and
the internal space caused a failure on the regex.
llvm-svn: 268548
Diffstat (limited to 'clang/docs/tools/dump_ast_matchers.py')
-rw-r--r-- | clang/docs/tools/dump_ast_matchers.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/docs/tools/dump_ast_matchers.py b/clang/docs/tools/dump_ast_matchers.py index 104189c4af3..45540405de9 100644 --- a/clang/docs/tools/dump_ast_matchers.py +++ b/clang/docs/tools/dump_ast_matchers.py @@ -95,7 +95,7 @@ def strip_doxygen(comment): def unify_arguments(args): """Gets rid of anything the user doesn't care about in the argument list.""" args = re.sub(r'internal::', r'', args) - args = re.sub(r'const\s+', r'', args) + args = re.sub(r'const\s+(.*)&', r'\1 ', args) args = re.sub(r'&', r' ', args) args = re.sub(r'(^|\s)M\d?(\s)', r'\1Matcher<*>\2', args) return args @@ -231,7 +231,7 @@ def act_on_decl(declaration, comment, allowed_types): m = re.match(r"""^\s*AST_MATCHER(_P)?(.?)(?:_OVERLOAD)?\( (?:\s*([^\s,]+)\s*,)? \s*([^\s,]+)\s* - (?:,\s*([^\s,]+)\s* + (?:,\s*([^,]+)\s* ,\s*([^\s,]+)\s*)? (?:,\s*([^\s,]+)\s* ,\s*([^\s,]+)\s*)? @@ -266,7 +266,7 @@ def act_on_decl(declaration, comment, allowed_types): # Parse Variadic functions. m = re.match( - r"""^.*llvm::VariadicFunction\s*<\s*([^,]+),\s*([^,]+),\s*[^>]+>\s* + r"""^.*internal::VariadicFunction\s*<\s*([^,]+),\s*([^,]+),\s*[^>]+>\s* ([a-zA-Z]*)\s*=\s*{.*};$""", declaration, flags=re.X) if m: |