From: Ted Kremenek Date: Sat, 16 Aug 2008 00:45:40 +0000 (+0000) Subject: Enhance null-dereference checker test. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dd463b8db0b07d2fdb99ffc7a7eb28eeb449c5d4;p=clang Enhance null-dereference checker test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54834 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Analysis/null-deref-ps.c b/test/Analysis/null-deref-ps.c index 6da44d0c73..92e8daa57e 100644 --- a/test/Analysis/null-deref-ps.c +++ b/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 +}