blob: a7ee16ec700dd27b2d805ed0be7b592e5811df4f [file] [log] [blame]
Ted Kremenekfaa2bd62012-11-02 17:50:53 +00001// RUN: %clang_cc1 -x objective-c -fobjc-arc -fblocks -Wimplicit-retain-self -verify %s
Fariborz Jahanian3f001ff2012-10-03 17:55:29 +00002// rdar://11194874
3
4@interface Root @end
5
6@interface I : Root
7{
8 int _bar;
9}
10@end
11
12@implementation I
13 - (void)foo{
14 ^{
Fariborz Jahanian5904c9c2012-10-03 22:39:32 +000015 _bar = 3; // expected-warning {{block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior}}
Fariborz Jahanian3f001ff2012-10-03 17:55:29 +000016 }();
17 }
18@end