From bcd2f76edbd1bcf966183444d5d1afcc1edc050d Mon Sep 17 00:00:00 2001 From: Zhongxing Xu Date: Fri, 6 Feb 2009 08:56:58 +0000 Subject: [PATCH] Put the region store specific test in a separate file. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63930 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Analysis/null-deref-ps.c | 9 --------- test/Analysis/region-only-test.c | 13 +++++++++++++ 2 files changed, 13 insertions(+), 9 deletions(-) create mode 100644 test/Analysis/region-only-test.c diff --git a/test/Analysis/null-deref-ps.c b/test/Analysis/null-deref-ps.c index 0c23690d45..6daedf0f93 100644 --- a/test/Analysis/null-deref-ps.c +++ b/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/test/Analysis/region-only-test.c b/test/Analysis/region-only-test.c new file mode 100644 index 0000000000..0eabb7b888 --- /dev/null +++ b/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 +} -- 2.50.1