summaryrefslogtreecommitdiffstats
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
commitb9875a984c7f2d9563e35a191df8849f2a306134 (patch)
tree33d599322f1aa00c82b851c43a855eebc9e68c5d
parent547b6c5ecd4d5e4d0669b912e8bd6b668a1c83a5 (diff)
downloadbcm5719-llvm-b9875a984c7f2d9563e35a191df8849f2a306134.tar.gz
bcm5719-llvm-b9875a984c7f2d9563e35a191df8849f2a306134.zip
[analyzer] Remove target triple from the malloc overflow test.
llvm-svn: 140635
-rw-r--r--clang/test/Analysis/malloc-overflow.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/test/Analysis/malloc-overflow.c b/clang/test/Analysis/malloc-overflow.c
index 395829c1d14..714fd3d308a 100644
--- a/clang/test/Analysis/malloc-overflow.c
+++ b/clang/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}}
}
-
OpenPOWER on IntegriCloud