]> granicus.if.org Git - clang/commitdiff
improve comments for MemberExpr.
authorChris Lattner <sabre@nondot.org>
Sun, 8 Mar 2009 06:56:32 +0000 (06:56 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 8 Mar 2009 06:56:32 +0000 (06:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66371 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Expr.h

index 48c2ad0cefc41157e587425c0e9a730770abd930..02a43c2079019414b140827c14a341d8b066d3a2 100644 (file)
@@ -910,13 +910,22 @@ public:
                               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 @@ public:
   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 {