[cfe-commits] r66371 - /cfe/trunk/include/clang/AST/Expr.h

Chris Lattner sabre at nondot.org
Sat Mar 7 22:56:33 PST 2009


Author: lattner
Date: Sun Mar  8 00:56:32 2009
New Revision: 66371

URL: http://llvm.org/viewvc/llvm-project?rev=66371&view=rev
Log:
improve comments for MemberExpr.

Modified:
    cfe/trunk/include/clang/AST/Expr.h

Modified: cfe/trunk/include/clang/AST/Expr.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Expr.h?rev=66371&r1=66370&r2=66371&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/Expr.h (original)
+++ cfe/trunk/include/clang/AST/Expr.h Sun Mar  8 00:56:32 2009
@@ -910,13 +910,22 @@
                               StmtClass SC);
 };
 
-/// MemberExpr - [C99 6.5.2.3] Structure and Union Members.
+/// MemberExpr - [C99 6.5.2.3] Structure and Union Members.  X->F and X.F.
 ///
 class MemberExpr : public Expr {
+  /// Base - the expression for the base pointer or structure references.  In
+  /// X.F, this is "X".
   Stmt *Base;
+  
+  /// MemberDecl - This is the decl being referenced by the field/member name.
+  /// In X.F, this is the decl referenced by F.
   NamedDecl *MemberDecl;
+  
+  /// MemberLoc - This is the location of the member name.
   SourceLocation MemberLoc;
-  bool IsArrow;      // True if this is "X->F", false if this is "X.F".
+  
+  /// IsArrow - True if this is "X->F", false if this is "X.F".
+  bool IsArrow;
 public:
   MemberExpr(Expr *base, bool isarrow, NamedDecl *memberdecl, SourceLocation l,
              QualType ty) 
@@ -928,6 +937,9 @@
   NamedDecl *getMemberDecl() const { return MemberDecl; }
   void setMemberDecl(NamedDecl *D) { MemberDecl = D; }
   bool isArrow() const { return IsArrow; }
+  
+  /// getMemberLoc - Return the location of the "member", in X->F, it is the
+  /// location of 'F'.
   SourceLocation getMemberLoc() const { return MemberLoc; }
 
   virtual SourceRange getSourceRange() const {





More information about the cfe-commits mailing list