aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/Analysis/dead-stores.m17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Analysis/dead-stores.m b/test/Analysis/dead-stores.m
index 730b8266bd..852e63afcd 100644
--- a/test/Analysis/dead-stores.m
+++ b/test/Analysis/dead-stores.m
@@ -59,3 +59,20 @@ void foo_rdar8527823();
}
}
@end
+
+// Don't flag dead stores to assignments to self within a nested assignment.
+@interface Rdar7947686
+- (id) init;
+@end
+
+@interface Rdar7947686_B : Rdar7947686
+- (id) init;
+@end
+
+@implementation Rdar7947686_B
+- (id) init {
+ id x = (self = [super init]); // no-warning
+ return x;
+}
+@end
+