[cfe-dev] Missing implicit cast inside CXXFunctionalCastExpr node.
eli.friedman at gmail.com
Fri Sep 2 15:34:59 CDT 2011
On Fri, Sep 2, 2011 at 12:04 PM, Enea Zaffanella <zaffanella at cs.unipr.it> wrote:
> Il 02/09/2011 19:42, Eli Friedman ha scritto:
>> On Fri, Sep 2, 2011 at 9:03 AM, Enea Zaffanella <zaffanella at cs.unipr.it> wrote:
>>> As far as I recall, CXXFunctionalCastExpr is just a syntactic wrapper
>>> and the semantics of the cast (eventually CK_NoOp) has to be found in an
>>> embedded ImplicitCastExpr node.
>> CXXFunctionalCastExpr can have a cast kind... it should be visible
>> with -ast-dump (and correct) with r139011.
> Thanks for the very quick fix.
> It looks like I was somehow misunderstanding CXXFunctionalCastExpr.
> Am I correct if I say that the argument expression of a (non type or
> value dependent) CXXFunctionalCastExpr can only be one of:
> - CXXConstructExpr
> - CXXBindTemporaryExpr
> - ImplicitCastExpr
> - an expression having scalar type
I don't know the complete list, but at the very least you're not
considering l-value casts (i.e. "typedef Class& ClassRef; [...]
ClassRef(Var) [...]"). Some casts can be represented without any extra
AST nodes, some casts require additional nodes (like CXXConstructExpr,
CXXBindTemporaryExpr, ImplicitCastExpr, MaterializeTemporaryExpr...
I'm not sure what the complete list is, and we might make some tweaks
in the future.)
More information about the cfe-dev