aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-02-14 00:37:42 +0000
committerDouglas Gregor <dgregor@apple.com>2009-02-14 00:37:42 +0000
commit0f4330c708753761313ce24e01223d6f0c130218 (patch)
treed2966432812dd253e5cee69c6888c5eb1e81774a
parenta316e7b735b12ce6b34961a9dcfaae34f4b08d29 (diff)
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
-rw-r--r--test/SemaCXX/no-implicit-builtin-decls.cpp7
1 files changed, 7 insertions, 0 deletions
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);