What is the query to match a function pointer, e.g., in the following code:
int foo(struct A *a, int b)
{
return a->x->y(b);
}
y
is the function pointer to match.
What is the query to match a function pointer, e.g., in the following code:
int foo(struct A *a, int b)
{
return a->x->y(b);
}
y
is the function pointer to match.
Copyright © 2021 Jogjafile Inc.
Finally, this is the answer for a call to a function pointer. The main difficulty was to detect the type of function pointers using the query. So I added the
ignoringParens(functionType())
traversal matcher to solve the problem. A simple usage offunctionType()
will not work.