[cfe-dev] Tentative typeid Parser/AST implementation

Sebastian Redl sebastian.redl at getdesigned.at
Sun Nov 9 12:35:42 PST 2008


Argiris Kirtzidis wrote:
> Your approach is not wrong, but I think that is better for consistency 
> if you implement typeid in a similar way as sizeof/alignof is 
> implemented.
> sizeof for type calls Action.ActOnSizeOfAlignOfTypeExpr (creating a 
> SizeOfAlignOfTypeExpr node), while sizeof for expression calls 
> Action.ActOnUnaryOp (creating a UnaryOperator expression node).
I saw that, started implementing it that way ... and then decided that 
the AST would be prettier if I did it my way.

But if that's not such a good idea, I can change it.

Sebastian



More information about the cfe-dev mailing list