summaryrefslogtreecommitdiffstats
path: root/clang/docs/tools
diff options
context:
space:
mode:
authorSamuel Benzaquen <sbenza@google.com>2013-08-16 16:19:42 +0000
committerSamuel Benzaquen <sbenza@google.com>2013-08-16 16:19:42 +0000
commitbd7d887f186808d19e37d526ba543e0e2dc29397 (patch)
tree82fbac426f8aba0b777bb53defbd0c034d34e1c5 /clang/docs/tools
parent8522270d7e2cb0c5417de0f58b20761cf9273f3d (diff)
downloadbcm5719-llvm-bd7d887f186808d19e37d526ba543e0e2dc29397.tar.gz
bcm5719-llvm-bd7d887f186808d19e37d526ba543e0e2dc29397.zip
Refactor ArgumentAdaptativeMatcher matchers to remove the template from their declaration.
Summary: Refactor ArgumentAdaptativeMatcher matchers to remove the template from their declaration. This facilitates dynamic registration. Change the registry code to use the regular overload resolution mechanism for adaptative matchers. Reviewers: klimek CC: cfe-commits, revane Differential Revision: http://llvm-reviews.chandlerc.com/D1402 llvm-svn: 188560
Diffstat (limited to 'clang/docs/tools')
-rw-r--r--clang/docs/tools/dump_ast_matchers.py10
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 08a7d961ff5..e72426eafbf 100644
--- a/clang/docs/tools/dump_ast_matchers.py
+++ b/clang/docs/tools/dump_ast_matchers.py
@@ -230,6 +230,16 @@ def act_on_decl(declaration, comment, allowed_types):
add_matcher(result_type, name, args, comment)
return
+ # Parse ArgumentAdapting matchers.
+ m = re.match(
+ r"""^.*ArgumentAdaptingMatcherFunc<.*>\s*([a-zA-Z]*)\s*=\s*{};$""",
+ declaration, flags=re.X)
+ if m:
+ name = m.groups()[0]
+ add_matcher('*', name, 'Matcher<*>', comment)
+ return
+
+
# Parse free standing matcher functions, like:
# Matcher<ResultType> Name(Matcher<ArgumentType> InnerMatcher) {
m = re.match(r"""^\s*(.*)\s+
OpenPOWER on IntegriCloud