brintos

brintos / llvm-project-archived public Read only

0
0
Text · 305 B · 3d46379 Raw
10 lines · cpp
1// RUN: %clang_analyze_cc1 -analyzer-checker=core -fblocks -verify %s2 3typedef void (^bptr)(void);4 5bptr 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