[cfe-dev] Tentative typeid Parser/AST implementation
Sebastian Redl
sebastian.redl at getdesigned.at
Tue Nov 11 08:09:00 PST 2008
Chris Lattner wrote:
>
> 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?
>
> -Chris
Here's the patch. Passes all regressions, but this was an ugly,
wide-reaching change, so perhaps some people can take a look at it
before I commit. I do feel the code is improved now.
Sebastian
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sizeofalignof.patch
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20081111/d90794e5/attachment.ksh>
More information about the cfe-dev
mailing list