[cfe-dev] CGCalleeInfo set Decl to Null while using as dereferenced callee

Friedman, Eli via cfe-dev cfe-dev at lists.llvm.org
Thu Sep 13 15:29:16 PDT 2018


On 9/13/2018 2:26 PM, Mustakimur Rahman Khandaker (Mustakim) via cfe-dev 
wrote:
> Now, in the /CGCalleeInfo, /compiler set the Decl for the Callee. What 
> I have discovered is that /Decl 
> *Expr::getReferencedDeclOfCallee()///returns nullptr and for that call 
> callee set to Decl as Null from CGCallee 
> CodeGenFunction::EmitCallee(constExpr *E). I beleive this is not an 
> expected behavior because it is declared as MathFunc and it should be 
> set as that.
>
> I would like to understand why it kept like this?

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.

What are you trying to do?

-Eli

-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180913/a6ebcd4b/attachment.html>


More information about the cfe-dev mailing list