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

Ted Kremenek kremenek at apple.com
Thu Jan 14 11:38:41 PST 2010


Author: kremenek
Date: Thu Jan 14 13:38:41 2010
New Revision: 93440

URL: http://llvm.org/viewvc/llvm-project?rev=93440&view=rev
Log:
Associate test case with Bugzilla PR.

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=93440&r1=93439&r2=93440&view=diff

==============================================================================
--- cfe/trunk/test/Analysis/casts.c (original)
+++ cfe/trunk/test/Analysis/casts.c Thu Jan 14 13:38:41 2010
@@ -1,4 +1,5 @@
 // RUN: %clang_cc1 -triple x86_64-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s
+// RUN: %clang_cc1 -triple i386-apple-darwin9 -analyze -analyzer-experimental-internal-checks -checker-cfref -analyzer-store=region -verify %s
 
 // Test if the 'storage' region gets properly initialized after it is cast to
 // 'struct sockaddr *'. 
@@ -58,13 +59,13 @@
     }
 }
 
-struct pcm_feeder {
+// PR 6035 - Test that a cast of a pointer to long and then to int does not crash SValuator.
+struct pr6035 {
   void *data;
 };
-// Test cast a pointer to long and then to int does not crash SValuator.
-void feed_swaplr (struct pcm_feeder *f)
-{
-  int bps;
-  bps = (long) f->data;
-  (void) bps;
+
+void pr6035_test (struct pr6035 *f) {
+  int x;
+  x = (long) f->data;
+  (void) x;
 }





More information about the cfe-commits mailing list