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 | 93a313869f343f3b452f38dbe8a631627b36a09d (patch) | |
tree | 54ffd5f9eae724988c22c49ab72a56a3685cb354 /clang/test/Sema/uninit-variables.c | |
parent | 4058d87ad560c4c82852562e1d08474777540d3f (diff) | |
download | bcm5719-llvm-93a313869f343f3b452f38dbe8a631627b36a09d.tar.gz bcm5719-llvm-93a313869f343f3b452f38dbe8a631627b36a09d.zip |
Teach -Wuninitialized not to assert when analyzing
blocks that reference captured variables.
llvm-svn: 124348
Diffstat (limited to 'clang/test/Sema/uninit-variables.c')
-rw-r--r-- | clang/test/Sema/uninit-variables.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Sema/uninit-variables.c b/clang/test/Sema/uninit-variables.c index 978c7649fa9..513298d9ac8 100644 --- a/clang/test/Sema/uninit-variables.c +++ b/clang/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); }(); +} + |