[cfe-commits] r44016 - in /cfe/trunk: AST/Expr.cpp AST/StmtPrinter.cpp AST/StmtSerialization.cpp Sema/SemaExpr.cpp include/clang/AST/Expr.h include/clang/AST/StmtNodes.def

Chris Lattner clattner at apple.com
Wed Dec 12 17:46:46 PST 2007


On Nov 12, 2007, at 6:29 AM, Steve Naroff wrote:
> URL: http://llvm.org/viewvc/llvm-project?rev=44016&view=rev
> Log:
> Implement instance variable references.

Hi Steve,

/// ObjCIvarRefExpr - A reference to an ObjC instance variable.
class ObjCIvarRefExpr : public Expr {
   class ObjcIvarDecl *D;
   SourceLocation Loc;
   Expr *Base;
   bool IsArrow:1;      // True if this is "X->F", false if this is  
"X.F".
   bool IsFreeIvar:1;   // True if ivar reference has no base (self  
assumed).

I know we discussed this, but please remind me: how is  
ObjCIvarRefExpr different from MemberExpr?  Is the issue that  
ObjcIvarDecl is not a FieldDecl or something?

Also, are "free" ivars currently being represented with this class or  
with DeclRefExpr?  I think we want to use DeclRefExpr.

-Chris



More information about the cfe-commits mailing list