diff options
author | Chris Lattner <sabre@nondot.org> | 2009-03-08 06:56:32 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-03-08 06:56:32 +0000 |
commit | ddca44e86281bb7dcf5fdcaf1563434c524e3861 (patch) | |
tree | 29b6d4a6df3a5ab4c3923dc3e12db01c99088ec0 | |
parent | 399bd1bc2b801ad85e4575e2401bb43919fcbee8 (diff) |
improve comments for MemberExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66371 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/AST/Expr.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h index 48c2ad0cef..02a43c2079 100644 --- a/include/clang/AST/Expr.h +++ b/include/clang/AST/Expr.h @@ -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 { |