diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-08-16 00:45:40 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-08-16 00:45:40 +0000 |
commit | dd463b8db0b07d2fdb99ffc7a7eb28eeb449c5d4 (patch) | |
tree | cd9af66078f4621feaa5083e8f5c13c6ef9091bc | |
parent | ddb2a3d55a24a1dbdf9152621642d9a4b4fc2f61 (diff) |
Enhance null-dereference checker test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54834 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Analysis/null-deref-ps.c | 10 |
1 files changed, 9 insertions, 1 deletions
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 +} |