Author: kremenek
Date: Tue Feb 1 14:45:26 2011
New Revision: 124681
URL: http://llvm.org/viewvc/llvm-project?rev=124681&view=rev
Log:
Add test case for dead stores checker to not flag dead assignments to 'self'
within a nested assignment.
Modified:
cfe/trunk/test/Analysis/dead-stores.m
Modified: cfe/trunk/test/Analysis/dead-stores.m
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/dead-stores.m?rev=124681&r1=124680&r2=124681&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/dead-stores.m (original)
+++ cfe/trunk/test/Analysis/dead-stores.m Tue Feb 1 14:45:26 2011
@@ -59,3 +59,20 @@
}
}
@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
+
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits