xref: /minix3/external/bsd/llvm/dist/clang/test/SemaObjC/warn-implicit-self-in-block.m (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1// RUN: %clang_cc1 -x objective-c -fobjc-arc -fblocks -Wimplicit-retain-self -verify %s
2// 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      ^{
15           _bar = 3; // expected-warning {{block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior}}
16       }();
17  }
18@end
19