From f3929daf7f2223913e226686cd4078a73849057c Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Mon, 30 Mar 2009 18:29:27 +0000 Subject: [PATCH] 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 --- test/Analysis/uninit-vals.c | 7 +++++++ 1 file changed, 7 insertions(+) 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; +} -- 2.50.1