[cfe-dev] Tentative typeid Parser/AST implementation

Sebastian Redl sebastian.redl at getdesigned.at
Mon Nov 10 14:13:45 PST 2008


Chris Lattner wrote:
>
> Hi Sebastian,
>
> I have another question for you.  :)  In this node, you're taking the 
> approach of handling exprs and types with the same AST node class.  In 
> sizeof/alignof, we have different nodes for the expr/type case.
>
> I agree with Doug that splitting up UnaryOperator (and friends) is 
> goodness, but I'm not sure that having the node handle both expr and 
> type subexpressions is a good approach.  What do you think?
I could have made a TypeidExpr and a TypeidOfTypeExpr and 
TypeidOfExprExpr that derive from it, but I felt that it was overkill.

Sebastian



More information about the cfe-dev mailing list