]> granicus.if.org Git - clang/commitdiff
Add a few more analyzer test cases.
authorTed Kremenek <kremenek@apple.com>
Thu, 2 Apr 2009 17:25:00 +0000 (17:25 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 2 Apr 2009 17:25:00 +0000 (17:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68326 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/uninit-vals-ps.c

index 37075a2ef85fa2a4d183bb8aa2287a9d87ec4898..d5b24a371b5a915f8965e626edd7b52ae19211d9 100644 (file)
@@ -43,6 +43,21 @@ int f3(void) {
     return 1;
 }
 
+void f4_aux(float* x);
+float f4(void) {
+  float x;
+  f4_aux(&x);
+  return x;  // no-warning
+}
+
+struct f5_struct { int x; };
+void f5_aux(struct f5_struct* s);
+int f5(void) {
+  struct f5_struct s;
+  f5_aux(&s);
+  return s.x; // no-warning
+}
+
 int ret_uninit() {
   int i;
   int *p = &i;