From: Ted Kremenek Date: Mon, 30 Mar 2009 18:29:27 +0000 (+0000) Subject: Add another uninitialized values test case illustrating that the CFG correctly X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f3929daf7f2223913e226686cd4078a73849057c;p=clang Add another uninitialized values test case illustrating that the CFG correctly handles declarations with multiple variables. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68046 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Analysis/uninit-vals.c b/test/Analysis/uninit-vals.c index bb0b8a49e7..d69250b65c 100644 --- a/test/Analysis/uninit-vals.c +++ b/test/Analysis/uninit-vals.c @@ -44,3 +44,10 @@ void f7(int i) { x += y; // expected-warning {{use of uninitialized variable}} } } + +int f8(int j) { + int x = 1, y = x + 1; + if (y) // no-warning + return x; + return y; +}