From 0f4330c708753761313ce24e01223d6f0c130218 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Sat, 14 Feb 2009 00:37:42 +0000 Subject: [PATCH] Add test case to insure that implicit builtin declarations for C library functions aren't created in C++ git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64513 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/SemaCXX/no-implicit-builtin-decls.cpp | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 test/SemaCXX/no-implicit-builtin-decls.cpp diff --git a/test/SemaCXX/no-implicit-builtin-decls.cpp b/test/SemaCXX/no-implicit-builtin-decls.cpp new file mode 100644 index 0000000000..8a0df9403a --- /dev/null +++ b/test/SemaCXX/no-implicit-builtin-decls.cpp @@ -0,0 +1,7 @@ +// RUN: clang -fsyntax-only -verify %s + +void f() { + void *p = malloc(sizeof(int) * 10); // expected-error{{no matching function for call to 'malloc'}} +} + +int malloc(double); -- 2.50.1