aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2007-11-12 22:29:28 +0000
committerFariborz Jahanian <fjahanian@apple.com>2007-11-12 22:29:28 +0000
commit232220c6982e3a70d8f7fc06a011ead490a2f516 (patch)
treeed66d8a42afb3f5e884e6c12de2929dc7feb0994 /include
parente1e6c0d5c79c0ee7ed62fef47a19aa7ecef40db4 (diff)
Patch to do statically typed ivar references.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44028 91177308-0d34-0410-b5e6-96231b3b80d8
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;