diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-02-14 00:37:42 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-02-14 00:37:42 +0000 |
commit | 2de3e31cf8af0454919ecb8a8c2310966569156b (patch) | |
tree | b2bafc72dd9419308b172af4debbf1736a8422e9 /clang/test/SemaCXX/no-implicit-builtin-decls.cpp | |
parent | ac5d4c5f8ec84453fe22a3c3b1bdb8ffd765423e (diff) | |
download | bcm5719-llvm-2de3e31cf8af0454919ecb8a8c2310966569156b.tar.gz bcm5719-llvm-2de3e31cf8af0454919ecb8a8c2310966569156b.zip |
Add test case to insure that implicit builtin declarations for C library functions aren't created in C++
llvm-svn: 64513
Diffstat (limited to 'clang/test/SemaCXX/no-implicit-builtin-decls.cpp')
-rw-r--r-- | clang/test/SemaCXX/no-implicit-builtin-decls.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/no-implicit-builtin-decls.cpp b/clang/test/SemaCXX/no-implicit-builtin-decls.cpp new file mode 100644 index 00000000000..8a0df9403a0 --- /dev/null +++ b/clang/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); |