aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/CheckObjCDealloc.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2008-10-30 22:28:48 +0000
committerTed Kremenek <kremenek@apple.com>2008-10-30 22:28:48 +0000
commit8bdf9b96e56ad0f6e1c5e3fdb730aceb35a81042 (patch)
tree2b59cd188f01342745cd98d6498a4872207471e7 /lib/Analysis/CheckObjCDealloc.cpp
parentd4a07988c8ba6b214e8d93c3a4048357484ba771 (diff)
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
Diffstat (limited to 'lib/Analysis/CheckObjCDealloc.cpp')
-rw-r--r--lib/Analysis/CheckObjCDealloc.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Analysis/CheckObjCDealloc.cpp b/lib/Analysis/CheckObjCDealloc.cpp
index 741fc18964..e41c827184 100644
--- a/lib/Analysis/CheckObjCDealloc.cpp
+++ b/lib/Analysis/CheckObjCDealloc.cpp
@@ -74,7 +74,8 @@ static bool scan_ivar_release(Stmt* S, ObjCIvarDecl* ID,
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;