diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-01-27 02:29:34 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-01-27 02:29:34 +0000 |
commit | 40900ee8f3072d05456134b57c0fad85a6bb21a6 (patch) | |
tree | 97fa5eb42c73a32ea08439ab1e31efa00dd37b51 /test/Sema/uninit-variables.c | |
parent | 1ea800c4ca76d5bb41aa8a1e0a6c7628b9fff28d (diff) |
Teach -Wuninitialized not to assert when analyzing
blocks that reference captured variables.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124348 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/uninit-variables.c')
-rw-r--r-- | test/Sema/uninit-variables.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/Sema/uninit-variables.c b/test/Sema/uninit-variables.c index 978c7649fa..513298d9ac 100644 --- a/test/Sema/uninit-variables.c +++ b/test/Sema/uninit-variables.c @@ -223,3 +223,9 @@ int test_34() { return x; // expected-note{{variable 'x' is possibly uninitialized when used here}} } +// Test that this case doesn't crash. +void test35(int x) { + __block int y = 0; + ^{ y = (x == 0); }(); +} + |