Static variables and functions won't collide with standard library
functions, so if we're declaring a static we should implicitly declare
a library function by the same name (e.g., malloc, strdup). Fixes PR3592.
llvm-svn: 64736
diff --git a/clang/test/Sema/implicit-builtin-redecl.c b/clang/test/Sema/implicit-builtin-redecl.c
new file mode 100644
index 0000000..837f79f
--- /dev/null
+++ b/clang/test/Sema/implicit-builtin-redecl.c
@@ -0,0 +1,7 @@
+// RUN: clang -fsyntax-only -verify %s
+
+// PR3592
+static void* malloc(int);
+static void* malloc(int size) {
+ return ((void*)0); /*do not use heap in this file*/
+}