• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-store=region -fblocks -verify %s
2 
3 typedef void (^bptr)(void);
4 
bf(int j)5 bptr bf(int j) {
6   __block int i;
7   const bptr &qq = ^{ i=0; }; // expected-note {{binding reference variable 'qq' here}}
8   return qq; // expected-error {{returning block that lives on the local stack}}
9 }
10