]> granicus.if.org Git - clang/commitdiff
Add test case to insure that implicit builtin declarations for C library functions...
authorDouglas Gregor <dgregor@apple.com>
Sat, 14 Feb 2009 00:37:42 +0000 (00:37 +0000)
committerDouglas Gregor <dgregor@apple.com>
Sat, 14 Feb 2009 00:37:42 +0000 (00:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64513 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaCXX/no-implicit-builtin-decls.cpp [new file with mode: 0644]

diff --git a/test/SemaCXX/no-implicit-builtin-decls.cpp b/test/SemaCXX/no-implicit-builtin-decls.cpp
new file mode 100644 (file)
index 0000000..8a0df94
--- /dev/null
@@ -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);