On Jan 7, 2009, at 1:59 PM, Douglas Gregor wrote:
> I really think this should be some form of MemberExpr (or subclass  
> thereof), because both semantic analysis and codegen need to treat  
> these as member expressions, and we don't want to push those clients  
> into dealing with ImplicitThisFieldDeclRefExpr or  
> ImplicitAnonStructUnionFieldRefExpr separately. Plus, we may need to  
> introduce implicit casts on "this" to turn it into a base class  
> pointer, and we need somewhere in the AST to store them.
>
> My patch isn't right, though. The "Implicit" flag should really only  
> occur in MemberExpr, not all the way up in Expr, and MemberExpr can  
> use that to get the source ranges correct.

Okay, another option would be to have something like:

  MemberExpr
    -> ImplicitThisMemberExpr
    -> ExplicitBaseMemberExpr

In the end, I think I'd prefer having an 'implicit this/self' bit in  
MemberExpr.  That sounds much better than an implicit bit on expr,

-Chris 
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to