From 3b977558cea10add50a5c2cbd94d7d66267781dd Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Sat, 16 Aug 2008 00:45:40 +0000 Subject: [PATCH] Enhance null-dereference checker test. llvm-svn: 54834 --- clang/test/Analysis/null-deref-ps.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/clang/test/Analysis/null-deref-ps.c b/clang/test/Analysis/null-deref-ps.c index 6da44d0c73fd..92e8daa57e2f 100644 --- a/clang/test/Analysis/null-deref-ps.c +++ b/clang/test/Analysis/null-deref-ps.c @@ -77,4 +77,12 @@ int f7(int x) { return x; } - +int f8(int *p, int *q) { + if (!p) + if (p) + *p = 1; // no-warning + + if (q) + if (!q) + *q = 1; // no-warning +}