зеркало из https://github.com/microsoft/clang-1.git
Add test case for dead stores checker to not flag dead assignments to 'self' within a nested assignment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124681 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
63eeade25d
Коммит
bf5c3acae3
|
@ -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
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче