From: Fariborz Jahanian Date: Thu, 7 Jan 2010 22:15:31 +0000 (+0000) Subject: Fixes a bug in my last patch (related to radar 7490331). X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d83658d45484df6e209d207e750a28b6424f9c56;p=clang 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 --- 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(BaseExpr)) { ObjCInterfaceType *iFaceDecl = dyn_cast(BaseExpr->getType()->getPointeeType()); // lookup which class implements the instance variable.