[cfe-dev] Tentative typeid Parser/AST implementation
Argiris Kirtzidis
akyrtzi at gmail.com
Mon Nov 10 08:30:31 PST 2008
Doug Gregor wrote:
> Personally, I think the approach taken by alignof and sizeof is not
> ideal. If one wants to look through the AST to find sizeof nodes, for
> example, you currently have to do a strange two-step of detecting
> UnaryOperator or SizeofAlignOfTypeExpr and then check auxiliary fields
> to figure out if you have 'sizeof'. The control flow is very messy.
> I'd rather see this split out into SizeofExpr and AlignOfExpr classes,
> each of which has a similar implementation to Sebastian's
> CXXTypeidExpr.
>
Good idea, that looks like a better approach for sizeof/alignof.
-Argiris
More information about the cfe-dev
mailing list