]> granicus.if.org Git - clang/commitdiff
Simplify test case. This test case also applies to PR 6013.
authorTed Kremenek <kremenek@apple.com>
Thu, 14 Jan 2010 19:47:50 +0000 (19:47 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 14 Jan 2010 19:47:50 +0000 (19:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93444 91177308-0d34-0410-b5e6-96231b3b80d8

test/Analysis/casts.c

index 3337b4d18fcd91ea30511047001034e00f634880..ef398bb173bea25c11eda4a262882b966731afc4 100644 (file)
@@ -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;
 }