brintos

brintos / llvm-project-archived public Read only

0
0
Text · 365 B · b3b4f19 Raw
31 lines · plain
1// RUN: %clang --analyze %s -fblocks2 3// https://reviews.llvm.org/D82598#21713124 5@interface Item6// ...7@end8 9@interface Collection10// ...11@end12 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