aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/RewriteObjC.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2010-01-07 22:15:31 +0000
committerFariborz Jahanian <fjahanian@apple.com>2010-01-07 22:15:31 +0000
commitd83658d45484df6e209d207e750a28b6424f9c56 (patch)
tree9cce8af146e5070e6d4eee4b175a91bce88b0e73 /lib/Frontend/RewriteObjC.cpp
parent82f0be9c53ba8f654313a3d5acfb99eceb12b069 (diff)
Fixes a bug in my last patch (related to radar 7490331).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92952 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/RewriteObjC.cpp')
-rw-r--r--lib/Frontend/RewriteObjC.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Frontend/RewriteObjC.cpp b/lib/Frontend/RewriteObjC.cpp
index 13de937141..e087cbbcdc 100644
--- a/lib/Frontend/RewriteObjC.cpp
+++ b/lib/Frontend/RewriteObjC.cpp
@@ -1185,7 +1185,7 @@ Stmt *RewriteObjC::RewriteObjCIvarRefExpr(ObjCIvarRefExpr *IV,
ObjCIvarDecl *D = IV->getDecl();
const Expr *BaseExpr = IV->getBase();
if (CurMethodDef) {
- if (IV->isArrow()) {
+ if (IV->isArrow() && isa<DeclRefExpr>(BaseExpr)) {
ObjCInterfaceType *iFaceDecl =
dyn_cast<ObjCInterfaceType>(BaseExpr->getType()->getPointeeType());
// lookup which class implements the instance variable.