[cfe-commits] r124681 - /cfe/trunk/test/Analysis/dead-stores.m

Ted Kremenek kremenek at apple.com
Tue Feb 1 12:45:26 PST 2011


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.
+ at interface Rdar7947686
+- (id) init;
+ at end
+
+ at interface Rdar7947686_B : Rdar7947686
+- (id) init;
+ at end
+
+ at implementation Rdar7947686_B
+- (id) init {
+  id x = (self = [super init]); // no-warning
+  return x;
+}
+ at end
+





More information about the cfe-commits mailing list