[cfe-dev] Tentative typeid Parser/AST implementation
clattner at apple.com
Mon Nov 10 17:57:22 CST 2008
On Nov 10, 2008, at 2:13 PM, Sebastian Redl wrote:
> 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.
I don't really care one way or the other, as long as we're
consistent. Do you think one approach is better than the other? If
you like merging the two together, would you be willing to change
sizeof/alignof to match?
More information about the cfe-dev