]> granicus.if.org Git - clang/commitdiff
Add another uninitialized values test case illustrating that the CFG correctly
authorTed Kremenek <kremenek@apple.com>
Mon, 30 Mar 2009 18:29:27 +0000 (18:29 +0000)
committerTed Kremenek <kremenek@apple.com>
Mon, 30 Mar 2009 18:29:27 +0000 (18:29 +0000)
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

index bb0b8a49e740e325f6caa454abfac86e75f3430d..d69250b65c0bb7f3e8bf7af47cdb837b2b90b90a 100644 (file)
@@ -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;
+}