summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/properties.m
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Analysis/properties.m')
-rw-r--r--clang/test/Analysis/properties.m15
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/Analysis/properties.m b/clang/test/Analysis/properties.m
index d06fa9974f9..ea8d19587a9 100644
--- a/clang/test/Analysis/properties.m
+++ b/clang/test/Analysis/properties.m
@@ -513,6 +513,21 @@ void testOpaqueConsistency(OpaqueIntWrapper *w) {
[_ivarOnly release]; // no-warning
}
+// rdar://problem/19862648
+- (void)establishIvarIsNilDuringLoops {
+ extern id getRandomObject();
+
+ int i = 4; // Must be at least 4 to trigger the bug.
+ while (--i) {
+ id x = 0;
+ if (getRandomObject())
+ x = _ivarOnly;
+ if (!x)
+ x = getRandomObject();
+ [x myMethod];
+ }
+}
+
@end
#endif // non-ARC
OpenPOWER on IntegriCloud