[cfe-users] How to I match all parameters?
bill.white at griggsinst.com
Mon Mar 24 14:25:17 PDT 2014
I'm trying to create an AST matcher which matches parameters to functions
whose type is a pointer to a particular class. Let's say I care about a
class named C. Then I want to match all calls to functions which pass a C*
I've tried this matcher:
But when I match it with this function:
int g(C*, const C*, int);
C bd, bdtoo;
return g(&bd, &bdtoo, h(&bd));
I only get two matches at the locations A and B above. I don't
get the match when bdtoo is passed,
I've tried sprinkling forEach around in various places, but I either
get ambiguous matchers, because forEach is polymorphic, or I don't
get any matches.
Thanks if you can offer any help.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-users