[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / Analysis / stack-block-returned.cpp
blobb45cf6335b900b62960394078303e2b6da4d03c7
1 // RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-store=region -fblocks -verify %s
3 typedef void (^bptr)(void);
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}}