Add test case for dead stores checker to not flag dead assignments to 'self' within a nested assignment.

llvm-svn: 124681
This commit is contained in:
Ted Kremenek 2011-02-01 20:45:26 +00:00
parent c1b4534e42
commit e57d88c6a3
1 changed files with 17 additions and 0 deletions

View File

@ -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