]> granicus.if.org Git - clang/commitdiff
Temporarily disable RegionStore for stack-addr-ps.c, as a new test case reveals
authorTed Kremenek <kremenek@apple.com>
Wed, 1 Jul 2009 23:24:11 +0000 (23:24 +0000)
committerTed Kremenek <kremenek@apple.com>
Wed, 1 Jul 2009 23:24:11 +0000 (23:24 +0000)
a case where RegionStore doesn't create symbolic values for the fields of
structs that are passed-by-value.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74662 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/stack-addr-ps.c

index 2f7a4bdf74088892e6f0e983ea6d7e966bf44181..848adc8d9feec1bcb37389fe17221f7995a8f3a1 100644 (file)
@@ -1,5 +1,6 @@
-// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s &&
-// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s
+// RUN: clang-cc -analyze -checker-cfref -analyzer-store=basic -verify %s
+
+// NOWORK: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s
 
 #include <stdlib.h>
 
@@ -41,3 +42,13 @@ void* alloca_test() {
   return p; // expected-warning{{Address of stack memory}}
 }
 
+int array_test(int x[2]) {
+  return x[0]; // no-warning
+}
+
+struct baz { int x; };
+
+int struct_test(struct baz byVal) {
+  return byVal.x; // no-warning;
+}
+