]> granicus.if.org Git - clang/commitdiff
Fixes a bug in my last patch (related to radar 7490331).
authorFariborz Jahanian <fjahanian@apple.com>
Thu, 7 Jan 2010 22:15:31 +0000 (22:15 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Thu, 7 Jan 2010 22:15:31 +0000 (22:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92952 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/RewriteObjC.cpp

index 13de937141afe4d45d4669d9eb581113fe63b1b1..e087cbbcdc39e57afd501ee9feea5d09eb7ac015 100644 (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.