mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-29 08:19:01 -04:00

Also convert stack-addr-ps.cpp to use the analyzer instead of just Sema, now that it doesn't crash, and extract the stack-block test into another file since it errors, and that prevents the analyzer from running. llvm-svn: 138613
10 lines
329 B
C++
10 lines
329 B
C++
// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-store=region -fblocks -verify %s
|
|
|
|
typedef void (^bptr)(void);
|
|
|
|
bptr bf(int j) {
|
|
__block int i;
|
|
const bptr &qq = ^{ i=0; }; // expected-note {{binding reference variable 'qq' here}}
|
|
return qq; // expected-error {{returning block that lives on the local stack}}
|
|
}
|