On Jan 7, 2009, at 1:26 PM, Douglas Gregor wrote:

> Author: dgregor
> Date: Wed Jan  7 15:26:07 2009
> New Revision: 61885
>
> URL: http://llvm.org/viewvc/llvm-project?rev=61885&view=rev
> Log:
> Fix printing of member references to avoid displaying implicitly- 
> generated member references, e.g., for anonymous struct/unions or  
> implicit 'this' in member functions

hi Doug,

I think this is the wrong approach.  Given something like this:

struct foo {
   int X;
   int Y() {
     return X;
   }
};

I think it would make more sense to model "X" as an  
ImplicitThisFieldDeclRefExpr (or something like that) than as a  
memberexpr with an implicit cxxthisexpr.  This more naturally followed  
the source.  One specific problem is that MemberExpr would have to  
know how to handle "implicit this" in getSourceRange() for example.

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

Reply via email to