aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-03-30 18:29:27 +0000
committerTed Kremenek <kremenek@apple.com>2009-03-30 18:29:27 +0000
commitf3929daf7f2223913e226686cd4078a73849057c (patch)
treebe766792b673f4f0d9f58e85c2b99b42102dc536
parentf1e5a9591317d20161aa0638ff36944ae8b89360 (diff)
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
-rw-r--r--test/Analysis/uninit-vals.c7
1 files changed, 7 insertions, 0 deletions
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;
+}