Diag(New->getLocation(), diag::warn_redecl_library_builtin) << New;
Diag(Old->getLocation(), diag::note_previous_builtin_declaration)
<< Old << Old->getType();
- return false;
+ return true;
}
PrevDiag = diag::note_previous_builtin_declaration;
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}}
+}