Distinguish between self.X = ... where self.X is a property reference and self.X is an implicit call to setX.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58462 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/CheckObjCDealloc.cpp b/lib/Analysis/CheckObjCDealloc.cpp
index 741fc18..e41c827 100644
--- a/lib/Analysis/CheckObjCDealloc.cpp
+++ b/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;