From 33ec2f8bc5a19c3b026d80299394989a4f8b3a3d Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Thu, 14 Jan 2010 19:47:50 +0000 Subject: [PATCH] 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 --- test/Analysis/casts.c | 14 +++++--------- 1 file 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; } -- 2.50.1