freebsd-skq/test/Analysis/region-only-test.c

14 lines
310 B
C
Raw Normal View History

2009-06-27 10:45:02 +00:00
// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region -verify %s
2009-06-02 17:58:47 +00:00
// 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)
2009-10-14 18:03:49 +00:00
(void)*x; // no-warning
2009-06-02 17:58:47 +00:00
}