[cfe-commits] r58462 - /cfe/trunk/lib/Analysis/CheckObjCDealloc.cpp

Ted Kremenek kremenek at apple.com
Thu Oct 30 15:28:50 PDT 2008


Author: kremenek
Date: Thu Oct 30 17:28:48 2008
New Revision: 58462

URL: http://llvm.org/viewvc/llvm-project?rev=58462&view=rev
Log:
Distinguish between self.X = ... where self.X is a property reference and self.X is an implicit call to setX.

Modified:
    cfe/trunk/lib/Analysis/CheckObjCDealloc.cpp

Modified: cfe/trunk/lib/Analysis/CheckObjCDealloc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CheckObjCDealloc.cpp?rev=58462&r1=58461&r2=58462&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/CheckObjCDealloc.cpp (original)
+++ cfe/trunk/lib/Analysis/CheckObjCDealloc.cpp Thu Oct 30 17:28:48 2008
@@ -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;
   





More information about the cfe-commits mailing list