From 93a313869f343f3b452f38dbe8a631627b36a09d Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Thu, 27 Jan 2011 02:29:34 +0000 Subject: Teach -Wuninitialized not to assert when analyzing blocks that reference captured variables. llvm-svn: 124348 --- clang/test/Sema/uninit-variables.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'clang/test/Sema/uninit-variables.c') 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); }(); +} + -- cgit v1.2.3