aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/clang/AST/Expr.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h
index 0a3caa7f88..b3279a0429 100644
--- a/include/clang/AST/Expr.h
+++ b/include/clang/AST/Expr.h
@@ -1234,13 +1234,19 @@ class ObjCProtocolExpr : public Expr {
class ObjCIvarRefExpr : public Expr {
class ObjcIvarDecl *D;
SourceLocation Loc;
+ Expr *Base;
+ bool IsArrow; // True if this is "X->F", false if this is "X.F".
+
public:
- ObjCIvarRefExpr(ObjcIvarDecl *d, QualType t, SourceLocation l) :
- Expr(ObjCIvarRefExprClass, t), D(d), Loc(l) {}
+ ObjCIvarRefExpr(ObjcIvarDecl *d, QualType t, SourceLocation l, Expr *base=0,
+ bool arrow = false) :
+ Expr(ObjCIvarRefExprClass, t), D(d), Loc(l), Base(base), IsArrow(arrow) {}
ObjcIvarDecl *getDecl() { return D; }
const ObjcIvarDecl *getDecl() const { return D; }
virtual SourceRange getSourceRange() const { return SourceRange(Loc); }
+ Expr *const getBase() const { return Base; }
+ const bool isArrow() const { return IsArrow; }
static bool classof(const Stmt *T) {
return T->getStmtClass() == ObjCIvarRefExprClass;