diff options
| -rw-r--r-- | clang/test/Analysis/null-deref-ps.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/Analysis/null-deref-ps.c b/clang/test/Analysis/null-deref-ps.c index 2b0ed0aadbc..e78aea0f8cb 100644 --- a/clang/test/Analysis/null-deref-ps.c +++ b/clang/test/Analysis/null-deref-ps.c @@ -117,6 +117,20 @@ int f7(int x) { 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) |

