diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp b/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp index 633648ec6c..7f64f8e2c4 100644 --- a/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/IdempotentOperationChecker.cpp @@ -357,8 +357,15 @@ void IdempotentOperationChecker::PostVisitBinaryOperator( const BinaryOperator *B) { // Add the ExplodedNode we just visited BinaryOperatorData &Data = hash[B]; - assert(isa<BinaryOperator>(cast<StmtPoint>(C.getPredecessor() - ->getLocation()).getStmt())); + + const Stmt *predStmt + = cast<StmtPoint>(C.getPredecessor()->getLocation()).getStmt(); + + // Ignore implicit calls to setters. + if (isa<ObjCPropertyRefExpr>(predStmt)) + return; + + assert(isa<BinaryOperator>(predStmt)); Data.explodedNodes.Add(C.getPredecessor()); } |