[cfe-commits] r93444 - /cfe/trunk/test/Analysis/casts.c

Ted Kremenek kremenek at apple.com
Thu Jan 14 11:47:50 PST 2010


Author: kremenek
Date: Thu Jan 14 13:47:50 2010
New Revision: 93444

URL: http://llvm.org/viewvc/llvm-project?rev=93444&view=rev
Log:
Simplify test case.  This test case also applies to PR 6013.

Modified:
    cfe/trunk/test/Analysis/casts.c

Modified: cfe/trunk/test/Analysis/casts.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/casts.c?rev=93444&r1=93443&r2=93444&view=diff

==============================================================================
--- cfe/trunk/test/Analysis/casts.c (original)
+++ cfe/trunk/test/Analysis/casts.c Thu Jan 14 13:47:50 2010
@@ -59,13 +59,9 @@
     }
 }
 
-// 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;
 }





More information about the cfe-commits mailing list