commit | 935022a9aebb32459fd56ccfb1e1cfb9c0a5176c | [log] [tgz] |
---|---|---|
author | Ted Kremenek <kremenek@apple.com> | Sat May 02 00:41:02 2009 +0000 |
committer | Ted Kremenek <kremenek@apple.com> | Sat May 02 00:41:02 2009 +0000 |
tree | c803b4e353dc36de17702b188aeaad0ce8f3c823 | |
parent | 2d833e349029ba73d4a101831371515a25dbda60 [diff] [blame] |
Add another null pointer check test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70614 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Analysis/null-deref-ps.c b/test/Analysis/null-deref-ps.c index 2b0ed0a..e78aea0 100644 --- a/test/Analysis/null-deref-ps.c +++ b/test/Analysis/null-deref-ps.c
@@ -117,6 +117,20 @@ return x; } +int* f7b(int *x) { + + int* p = 0; + + if (((void*)0) == x) + p = qux(); + + if (((void*)0) == x) + *p = 1; // no-warning + + return x; +} + + int f8(int *p, int *q) { if (!p) if (p)