summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/attr-malloc.c
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2010-11-16 10:26:08 +0000
committerChandler Carruth <chandlerc@gmail.com>2010-11-16 10:26:08 +0000
commitb19289331daac36ff1fb45a12d75915f160a9891 (patch)
tree07c97c56f30bceddaf55e0ccead9fa6d1ef2f83b /clang/test/Sema/attr-malloc.c
parent07bb19667ac2afcd3101169584dcbdf53770ee51 (diff)
downloadbcm5719-llvm-b19289331daac36ff1fb45a12d75915f160a9891.tar.gz
bcm5719-llvm-b19289331daac36ff1fb45a12d75915f160a9891.zip
This really seems like a boring set of fixes to our tests to make them more
independent of the underlying system. Let me know if any of these are too aggressive. llvm-svn: 119345
Diffstat (limited to 'clang/test/Sema/attr-malloc.c')
-rw-r--r--clang/test/Sema/attr-malloc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/test/Sema/attr-malloc.c b/clang/test/Sema/attr-malloc.c
index 9970b9de4f9..2cec84de496 100644
--- a/clang/test/Sema/attr-malloc.c
+++ b/clang/test/Sema/attr-malloc.c
@@ -1,7 +1,10 @@
// RUN: %clang -Xclang -verify -fsyntax-only %s
// RUN: %clang -emit-llvm -S -o %t %s
-#include <stdlib.h>
+#include <stddef.h>
+
+// Declare malloc here explicitly so we don't depend on system headers.
+void * malloc(size_t) __attribute((malloc));
int no_vars __attribute((malloc)); // expected-warning {{functions returning a pointer type}}
OpenPOWER on IntegriCloud