diff options
author | John McCall <rjmccall@apple.com> | 2010-12-02 01:19:52 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-12-02 01:19:52 +0000 |
commit | b7bd14fa08d68da7936b97b03912026ec06cb830 (patch) | |
tree | 6149f8b6a48e6786e2aeb09ec66fce52828226bc /clang/lib/Checker | |
parent | 13e3b00e7619688a9e69eec0e0a49f74f2aed365 (diff) | |
download | bcm5719-llvm-b7bd14fa08d68da7936b97b03912026ec06cb830.tar.gz bcm5719-llvm-b7bd14fa08d68da7936b97b03912026ec06cb830.zip |
Simplify the ASTs by consolidating ObjCImplicitGetterSetterExpr and ObjCPropertyRefExpr
into the latter.
llvm-svn: 120643
Diffstat (limited to 'clang/lib/Checker')
-rw-r--r-- | clang/lib/Checker/CheckObjCDealloc.cpp | 4 | ||||
-rw-r--r-- | clang/lib/Checker/GRExprEngine.cpp | 8 |
2 files changed, 2 insertions, 10 deletions
diff --git a/clang/lib/Checker/CheckObjCDealloc.cpp b/clang/lib/Checker/CheckObjCDealloc.cpp index 11ddaca9d6f..8ee6daa5c8a 100644 --- a/clang/lib/Checker/CheckObjCDealloc.cpp +++ b/clang/lib/Checker/CheckObjCDealloc.cpp @@ -76,8 +76,8 @@ static bool scan_ivar_release(Stmt* S, ObjCIvarDecl* ID, if (BinaryOperator* BO = dyn_cast<BinaryOperator>(S)) if (BO->isAssignmentOp()) if (ObjCPropertyRefExpr* PRE = - dyn_cast<ObjCPropertyRefExpr>(BO->getLHS()->IgnoreParenCasts())) - if (PRE->getProperty() == PD) + dyn_cast<ObjCPropertyRefExpr>(BO->getLHS()->IgnoreParenCasts())) + if (PRE->isExplicitProperty() && PRE->getExplicitProperty() == PD) if (BO->getRHS()->isNullPointerConstant(Ctx, Expr::NPC_ValueDependentIsNull)) { // This is only a 'release' if the property kind is not diff --git a/clang/lib/Checker/GRExprEngine.cpp b/clang/lib/Checker/GRExprEngine.cpp index a552447b300..99dcdcff419 100644 --- a/clang/lib/Checker/GRExprEngine.cpp +++ b/clang/lib/Checker/GRExprEngine.cpp @@ -852,7 +852,6 @@ void GRExprEngine::Visit(const Stmt* S, ExplodedNode* Pred, case Stmt::ObjCAtFinallyStmtClass: case Stmt::ObjCAtTryStmtClass: case Stmt::ObjCEncodeExprClass: - case Stmt::ObjCImplicitSetterGetterRefExprClass: case Stmt::ObjCIsaExprClass: case Stmt::ObjCPropertyRefExprClass: case Stmt::ObjCProtocolExprClass: @@ -1221,7 +1220,6 @@ void GRExprEngine::VisitLValue(const Expr* Ex, ExplodedNode* Pred, return; case Stmt::ObjCPropertyRefExprClass: - case Stmt::ObjCImplicitSetterGetterRefExprClass: // FIXME: Property assignments are lvalues, but not really "locations". // e.g.: self.x = something; // Here the "self.x" really can translate to a method call (setter) when @@ -3410,12 +3408,6 @@ void GRExprEngine::VisitBinaryOperator(const BinaryOperator* B, Expr* LHS = B->getLHS()->IgnoreParens(); Expr* RHS = B->getRHS()->IgnoreParens(); - // FIXME: Add proper support for ObjCImplicitSetterGetterRefExpr. - if (isa<ObjCImplicitSetterGetterRefExpr>(LHS)) { - Visit(RHS, Pred, Dst); - return; - } - if (B->isAssignmentOp()) VisitLValue(LHS, Pred, Tmp1); else |