Running AST matchers on part of the AST

Hi,

I would like to run some dynamic matchers on a single function body or I can either run it the full AST (MatchFinder::matchAST) or on a single node (MatchFinder::match).

What is the best way to achieve what I want ? Do you think it is worth I change clang's code and submit a patch ?

Thanks,

David.

Hi!

Before you do that.. I would like to know why you would do that?

I don't think it sounds ok unless there is a good reason.

Best regards,
Daniel Marjamäki

I'm using clang matchers as an input language to my tool to label interesting nodes.

Running it against the full AST works, but it less inefficient.