forked from OSchip/llvm-project
Remove bogus assertion in IdempotentOperationsChecker.
llvm-svn: 127687
This commit is contained in:
parent
1a37ae40e1
commit
cdb2ae587a
|
@ -336,10 +336,9 @@ void IdempotentOperationChecker::checkPostStmt(const BinaryOperator *B,
|
|||
= cast<StmtPoint>(C.getPredecessor()->getLocation()).getStmt();
|
||||
|
||||
// Ignore implicit calls to setters.
|
||||
if (isa<ObjCPropertyRefExpr>(predStmt))
|
||||
if (!isa<BinaryOperator>(predStmt))
|
||||
return;
|
||||
|
||||
assert(isa<BinaryOperator>(predStmt));
|
||||
|
||||
Data.explodedNodes.Add(C.getPredecessor());
|
||||
}
|
||||
|
||||
|
|
|
@ -40,3 +40,15 @@ void pr9116(NSObject *placeholder) {
|
|||
int x = placeholder.media.locked = placeholder ? 1 : 0;
|
||||
}
|
||||
|
||||
// <rdar://problem/9130239>: Test that calling property setters doesn't
|
||||
// trigger an assertion failure when the object is nil.
|
||||
@interface RDar9130239
|
||||
@property (assign) id delegate;
|
||||
@end
|
||||
|
||||
void test_RDar9130239(RDar9130239 *x) {
|
||||
if (x)
|
||||
return;
|
||||
x.delegate = x; // no-warning
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue