Distinguish between self.X = ... where self.X is a property reference and self.X is an implicit call to setX.

llvm-svn: 58462
diff --git a/clang/lib/Analysis/CheckObjCDealloc.cpp b/clang/lib/Analysis/CheckObjCDealloc.cpp
index 741fc18..e41c827 100644
--- a/clang/lib/Analysis/CheckObjCDealloc.cpp
+++ b/clang/lib/Analysis/CheckObjCDealloc.cpp
@@ -74,7 +74,8 @@
     if (BO->isAssignmentOp())
       if(ObjCPropertyRefExpr* PRE = 
          dyn_cast<ObjCPropertyRefExpr>(BO->getLHS()->IgnoreParenCasts()))
-          if(PRE->getProperty() == PD)
+          if(PRE->getKind() == ObjCPropertyRefExpr::PropertyRef &&
+             PRE->getProperty() == PD)
             if(BO->getRHS()->isNullPointerConstant(Ctx))
               return true;