From: Douglas Gregor Date: Sat, 14 Feb 2009 00:37:42 +0000 (+0000) Subject: Add test case to insure that implicit builtin declarations for C library functions... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0f4330c708753761313ce24e01223d6f0c130218;p=clang 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 --- 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);