[cfe-dev] Expression type unexpected
James Dennett via cfe-dev
cfe-dev at lists.llvm.org
Wed Nov 25 10:30:09 PST 2015
On Wed, Nov 25, 2015 at 10:20 AM, Daniel Dilts via cfe-dev <
cfe-dev at lists.llvm.org> wrote:
> It makes sense to me that int->MyType->int occurs. Could someone explain
>> what I am missing, why I get these results, and how to get what I would
>> expect (X->MyType->X)?
>>
>
> I am seeing in the AST an ImplicitCastExpr to int. Why is this present?
> I thought that the arguments are passed to a variadic function as their
> actual types.
>
>
The default argument promotions (and some others, such as nullptr_t ->
void*) apply per [expr.call]p7 (in C++11).
-- James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20151125/f607c68a/attachment.html>
More information about the cfe-dev
mailing list