diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-03-30 18:29:27 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-03-30 18:29:27 +0000 |
commit | f3929daf7f2223913e226686cd4078a73849057c (patch) | |
tree | be766792b673f4f0d9f58e85c2b99b42102dc536 | |
parent | f1e5a9591317d20161aa0638ff36944ae8b89360 (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.c | 7 |
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; +} |