diff options
author | Ted Kremenek <kremenek@apple.com> | 2010-01-14 19:47:50 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2010-01-14 19:47:50 +0000 |
commit | 33ec2f8bc5a19c3b026d80299394989a4f8b3a3d (patch) | |
tree | 18968d4ce19a7d805d5db3358d07c6a2ec7ab356 | |
parent | 74618dec963b43f6442c1780ea7795de707a1cef (diff) |
Simplify test case. This test case also applies to PR 6013.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93444 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Analysis/casts.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/test/Analysis/casts.c b/test/Analysis/casts.c index 3337b4d18f..ef398bb173 100644 --- a/test/Analysis/casts.c +++ b/test/Analysis/casts.c @@ -59,13 +59,9 @@ void doit(char *data, int len) { } } -// PR 6035 - Test that a cast of a pointer to long and then to int does not crash SValuator. -struct pr6035 { - void *data; -}; - -void pr6035_test (struct pr6035 *f) { - int x; - x = (long) f->data; - (void) x; +// PR 6013 and 6035 - Test that a cast of a pointer to long and then to int does not crash SValuator. +void pr6013_6035_test(void *p) { + unsigned int foo; + foo = ((long)(p)); + (void) foo; } |