summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
Diffstat (limited to 'clang')
-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 4db3633620c..f3591a3bbde 100644
--- a/clang/test/Analysis/null-deref-ps.c
+++ b/clang/test/Analysis/null-deref-ps.c
@@ -272,4 +272,13 @@ void f13() {
if (((((int) x) << 2) + 1) >> 1) *x = 1; // no-warning
}
+// PR 4759 - Attribute non-null checking by the analyzer was not correctly
+// handling pointer values that were undefined.
+void pr4759_aux(int *p) __attribute__((nonnull));
+
+void pr4759() {
+ int *p;
+ pr4759_aux(p); // expected-warning{{undefined}}
+}
+
OpenPOWER on IntegriCloud