Fixes a bug in my last patch (related to radar 7490331).

llvm-svn: 92952
This commit is contained in:
Fariborz Jahanian 2010-01-07 22:15:31 +00:00
parent dab2cd543f
commit 1444230c40
1 changed files with 1 additions and 1 deletions

View File

@ -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.