aboutsummaryrefslogtreecommitdiff
path: root/test/Analysis/malloc-overflow.c
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2011-09-27 20:41:53 +0000
committerAnna Zaks <ganna@apple.com>2011-09-27 20:41:53 +0000
commit6479c664f0ea191e72224578b655d8846f919bef (patch)
treec00167c228960a44938547c5a5a24208d2b6a7b0 /test/Analysis/malloc-overflow.c
parent2fe363622c32c471e8a68c68ba5cc372644f24fb (diff)
[analyzer] Remove target triple from the malloc overflow test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140635 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Analysis/malloc-overflow.c')
-rw-r--r--test/Analysis/malloc-overflow.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/Analysis/malloc-overflow.c b/test/Analysis/malloc-overflow.c
index 395829c1d1..714fd3d308 100644
--- a/test/Analysis/malloc-overflow.c
+++ b/test/Analysis/malloc-overflow.c
@@ -1,5 +1,6 @@
-// RUN: %clang_cc1 -triple x86_64-apple-macosx10.7.0 -analyze -analyzer-checker=experimental.security.MallocOverflow -verify %s
+// RUN: %clang_cc1 -analyze -analyzer-checker=experimental.security.MallocOverflow -verify %s
+#define NULL ((void *) 0)
typedef __typeof__(sizeof(int)) size_t;
extern void * malloc(size_t);
@@ -39,7 +40,6 @@ void * f6(int n)
return malloc((n + 1) * sizeof(int)); // expected-warning {{the computation of the size of the memory allocation may overflow}}
}
-#include <stddef.h>
extern void * malloc (size_t);
void * f7(int n)
@@ -111,4 +111,3 @@ void * f14(int n)
return NULL;
return malloc(n * sizeof(int)); // expected-warning {{the computation of the size of the memory allocation may overflow}}
}
-