summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-02-18 22:00:45 +0000
committerDouglas Gregor <dgregor@apple.com>2009-02-18 22:00:45 +0000
commit222e5e4ad227b95d59bf12a66d97b2c47a3ef615 (patch)
treedcdcbd5fc9ff3437f2401407a841b8a5456482d7 /clang/test/Sema
parent1045289881a0e3cad125bf420c26b91a3b245a17 (diff)
downloadbcm5719-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')
-rw-r--r--clang/test/Sema/implicit-builtin-redecl.c7
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}}
+}
OpenPOWER on IntegriCloud