2012-11-03 01:50:53 +08:00
|
|
|
// RUN: %clang_cc1 -x objective-c -fobjc-arc -fblocks -Wimplicit-retain-self -verify %s
|
2012-10-04 01:55:29 +08:00
|
|
|
// rdar://11194874
|
|
|
|
|
|
|
|
@interface Root @end
|
|
|
|
|
|
|
|
@interface I : Root
|
|
|
|
{
|
|
|
|
int _bar;
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation I
|
|
|
|
- (void)foo{
|
|
|
|
^{
|
2012-10-04 06:39:32 +08:00
|
|
|
_bar = 3; // expected-warning {{block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior}}
|
2012-10-04 01:55:29 +08:00
|
|
|
}();
|
|
|
|
}
|
|
|
|
@end
|