forked from OSchip/llvm-project
Add test case showing that a recursive block that captures a block pointer that
isn't marked '__block' is bad. llvm-svn: 96357
This commit is contained in:
parent
bc91b44a23
commit
3eac2454dc
|
@ -83,3 +83,8 @@ void test2_b() {
|
|||
// 'x' is bound at block creation.
|
||||
^{ y = x + 1; }(); // no-warning
|
||||
}
|
||||
|
||||
void test2_c() {
|
||||
typedef void (^myblock)(void);
|
||||
myblock f = ^() { f(); }; // expected-warning{{Variable 'f' is captured by block with a garbage value}}
|
||||
}
|
Loading…
Reference in New Issue