diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-02-06 08:56:58 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2009-02-06 08:56:58 +0000 |
commit | 4bdb1240361771e528526014cab586cc0f422fdd (patch) | |
tree | 1739ead82fde88a3c72ded600d585bbebaaa5d02 /clang | |
parent | e42755334c07578f781fbd5bf659d984057ace5a (diff) | |
download | bcm5719-llvm-4bdb1240361771e528526014cab586cc0f422fdd.tar.gz bcm5719-llvm-4bdb1240361771e528526014cab586cc0f422fdd.zip |
Put the region store specific test in a separate file.
llvm-svn: 63930
Diffstat (limited to 'clang')
-rw-r--r-- | clang/test/Analysis/null-deref-ps.c | 9 | ||||
-rw-r--r-- | clang/test/Analysis/region-only-test.c | 13 |
2 files changed, 13 insertions, 9 deletions
diff --git a/clang/test/Analysis/null-deref-ps.c b/clang/test/Analysis/null-deref-ps.c index 0c23690d454..6daedf0f93e 100644 --- a/clang/test/Analysis/null-deref-ps.c +++ b/clang/test/Analysis/null-deref-ps.c @@ -212,12 +212,3 @@ void f12(HF12ITEM i, char *q) { *p = 1; // no-warning } -// Exercise ElementRegion with SymbolicRegion as super region. -void foo(int* p) { - int *x; - int a; - if (p[0] == 1) - x = &a; - if (p[0] == 1) - *x; // no-warning -} diff --git a/clang/test/Analysis/region-only-test.c b/clang/test/Analysis/region-only-test.c new file mode 100644 index 00000000000..0eabb7b8889 --- /dev/null +++ b/clang/test/Analysis/region-only-test.c @@ -0,0 +1,13 @@ +// RUN: clang -analyze -checker-simple -analyzer-store-region -verify %s + +// Region store must be enabled for tests in this file. + +// Exercise creating ElementRegion with symbolic super region. +void foo(int* p) { + int *x; + int a; + if (p[0] == 1) + x = &a; + if (p[0] == 1) + *x; // no-warning +} |