1// RUN: %clang --analyze %s -fblocks
2
3// https://reviews.llvm.org/D82598#2171312
4
5@interface Item
6// ...
7@end
8
9@interface Collection
10// ...
11@end
12
13typedef void (^Blk)();
14
15struct RAII {
16  Blk blk;
17
18public:
19  RAII(Blk blk): blk(blk) {}
20  ~RAII() { blk(); }
21};
22
23void foo(Collection *coll) {
24  RAII raii(^{});
25  for (Item *item in coll) {}
26  int i;
27  {
28    int j;
29  }
30}
31