<div>I actually try to instrument before those indirect call to extract the memory address of callee (in above case: func.f). I know I can extract that using <font style="font-family:"Droid Sans Mono", monospace, monospace, "Droid Sans Fallback""><span style="color:rgb(121, 94, 38)">GetAddrOfLocalVar</span></font> if I know the Decl of the callee. But, the point I reached to createCall for indirect call, I don't have that information anymore for these cases. I don't know if there could be an alternative design possible to achieve it.</div><br><div class="gmail_quote_attribution">On Sep 13 2018, at 6:29 pm, Friedman, Eli <efriedma@codeaurora.org> wrote:</div><blockquote><br><div><br><div><div>On 9/13/2018 2:26 PM, Mustakimur Rahman Khandaker (Mustakim) via cfe-dev wrote:</div></div><blockquote><div>Now, in the <em>CGCalleeInfo, </em><font style="font-family:"Droid Sans Mono", monospace, monospace, "Droid Sans Fallback"">compiler set the Decl for the Callee.</font> What I have discovered is that <em><font style="font-family:"Droid Sans Mono", monospace, monospace, "Droid Sans Fallback"">Decl *Expr::getReferencedDeclOfCallee()</font></em><em> </em>returns nullptr and for that call callee set to Decl as Null from <font style="font-family:"Droid Sans Mono", monospace, monospace, "Droid Sans Fallback"">CGCallee </font><font style="font-family:"Droid Sans Mono", monospace, monospace, "Droid Sans Fallback""><span style="color:rgb(121, 94, 38)">CodeGenFunction::EmitCallee</span></font><font style="font-family:"Droid Sans Mono", monospace, monospace, "Droid Sans Fallback"">(</font><font style="font-family:"Droid Sans Mono", monospace, monospace, "Droid Sans Fallback""><span style="color:rgb(0, 0, 255)">const</span></font><font style="font-family:"Droid Sans Mono", monospace, monospace, "Droid Sans Fallback""> Expr *E)</font>. I beleive this is not an expected behavior because it is declared as MathFunc and it should be set as that.</div><br><div>I would like to understand why it kept like this?</div></blockquote><br><div>It mostly doesn't matter because the callers of getReferencedDeclOfCallee/getCalleeDecl generally don't care about declarations that aren't a FunctionDecl, and code generally doesn't call explicit casts of function pointers.</div><br><div>What are you trying to do?</div><br><div>-Eli</div><code><pre style="background-color:rgba(0,0,0,0.05);padding:0.2em 1em">-- <br>Employee of Qualcomm Innovation Center, Inc.<br>Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project</pre></code></div></blockquote><img class="mailspring-open" alt="Open Tracking" width="0" height="0" style="border:0; width:0; height:0;" src="https://link.getmailspring.com/open/1536929245.local-fabb2c57-0704-v1.4.2-f587b7b7@getmailspring.com?recipient=Y2ZlLWRldkBsaXN0cy5sbHZtLm9yZw%3D%3D">