diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-02-18 22:00:45 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-02-18 22:00:45 +0000 |
commit | 222e5e4ad227b95d59bf12a66d97b2c47a3ef615 (patch) | |
tree | dcdcbd5fc9ff3437f2401407a841b8a5456482d7 /clang/test/Sema/implicit-builtin-redecl.c | |
parent | 1045289881a0e3cad125bf420c26b91a3b245a17 (diff) | |
download | bcm5719-llvm-222e5e4ad227b95d59bf12a66d97b2c47a3ef615.tar.gz bcm5719-llvm-222e5e4ad227b95d59bf12a66d97b2c47a3ef615.zip |
Return true on errors, return true on errors, return true on errors
llvm-svn: 64957
Diffstat (limited to 'clang/test/Sema/implicit-builtin-redecl.c')
-rw-r--r-- | clang/test/Sema/implicit-builtin-redecl.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/test/Sema/implicit-builtin-redecl.c b/clang/test/Sema/implicit-builtin-redecl.c index 837f79f4ef6..9ff23f9f13b 100644 --- a/clang/test/Sema/implicit-builtin-redecl.c +++ b/clang/test/Sema/implicit-builtin-redecl.c @@ -5,3 +5,10 @@ static void* malloc(int); static void* malloc(int size) { return ((void*)0); /*do not use heap in this file*/ } + +void *calloc(int, int, int); // expected-warning{{incompatible redeclaration of library function 'calloc' will be ignored}} \ +// expected-note{{'calloc' is a builtin with type 'void *(unsigned long, unsigned long)'}} + +void f1(void) { + return calloc(0, 0, 0); // expected-error{{too many arguments to function call}} +} |