aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-01-14 19:38:41 +0000
committerTed Kremenek <kremenek@apple.com>2010-01-14 19:38:41 +0000
commit74618dec963b43f6442c1780ea7795de707a1cef (patch)
tree5b5ec150562ed1852477ca1ff96a3da845beca9c
parent3a47e23471ea2edec6464bfe7fd6d54d9a04271f (diff)
Associate test case with Bugzilla PR.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93440 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Analysis/casts.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/test/Analysis/casts.c b/test/Analysis/casts.c
index e106f34832..3337b4d18f 100644
--- a/test/Analysis/casts.c
+++ b/test/Analysis/casts.c
@@ -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 @@ void doit(char *data, int len) {
}
}
-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;
}