diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-05-01 23:35:18 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-05-01 23:35:18 +0000 |
commit | 956a37dd8360054247b9b10615697e80bdda8741 (patch) | |
tree | 96c5a277793e41677437a310a64f5b3d0006bed7 | |
parent | 632975b0bec2ec3ff68a81b6e39e87d1968aa4d6 (diff) |
Add another test case found due to an analyzer regression.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70600 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Analysis/misc-ps.m | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Analysis/misc-ps.m b/test/Analysis/misc-ps.m index 005109fb73..fe603d6345 100644 --- a/test/Analysis/misc-ps.m +++ b/test/Analysis/misc-ps.m @@ -272,3 +272,15 @@ next_opcode: } } +// Test invalidating pointers-to-pointers with slightly different types. This +// example came from a recent false positive due to a regression where the +// branch condition was falsely reported as being uninitialized. +void invalidate_by_ref(char **x); +int test_invalidate_by_ref() { + unsigned short y; + invalidate_by_ref((char**) &y); + if (y) // no-warning + return 1; + return 0; +} + |