Add test case showing that a recursive block that captures a block pointer that

isn't marked '__block' is bad.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96357 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Ted Kremenek 2010-02-16 16:55:10 +00:00
Родитель 61814f6a24
Коммит 6418825fb8
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -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}}
}