function pointers in clang's codegen

From within Clang’s CodeGen, I would like to be able to determine if a function pointer is being called and insert a call to my own function before this.

EmitCallExpr(in CGExpr.cpp) takes in a CallExpr, I’m wondering if I can determine if a function pointer is being called by seeing if it is a indirect call. For C, is this the only way to cause a indirect call? Is this safe? Also, can I call my own function here? I’m not entirely sure what to modify.

Thanks