summaryrefslogtreecommitdiffstats
path: root/clang/test/Analysis/null-deref-ps.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Analysis/null-deref-ps.c')
-rw-r--r--clang/test/Analysis/null-deref-ps.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/Analysis/null-deref-ps.c b/clang/test/Analysis/null-deref-ps.c
index 6daedf0f93e..0c23690d454 100644
--- a/clang/test/Analysis/null-deref-ps.c
+++ b/clang/test/Analysis/null-deref-ps.c
@@ -212,3 +212,12 @@ 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
+}
OpenPOWER on IntegriCloud