Description of the issue
I want to resolve calls made with pointer variables, such as:
struct foo_struct {
void (*foo)(void);
};
static void foo_func(void)
{
printf("hello from foo_func\n");
}
static struct foo_struct bar_ops = {
.foo = foo_func,
};
int main(void)
{
// pointer call to foo_func
struct foo_struct *ops_ptr = &bar_ops;
ops_ptr->foo();
// another pointer call to foo_func
void (*ptr_call)(void);
ptr_call = foo_func;
ptr_call();
return 0;
}
Why can't resolveCall from import semmle.code.cpp.ir.dataflow.ResolveCall resolve it?
Is there a solution available for this?
Thanks in advance.