Douglas Gregor | 9add317 | 2009-02-17 03:23:10 +0000 | [diff] [blame] | 1 | // RUN: clang -fsyntax-only -verify %s |
| 2 | |
| 3 | // PR3592 |
| 4 | static void* malloc(int); |
| 5 | static void* malloc(int size) { |
| 6 | return ((void*)0); /*do not use heap in this file*/ |
| 7 | } |
Douglas Gregor | c2b6a82 | 2009-02-18 22:00:45 +0000 | [diff] [blame] | 8 | |
| 9 | void *calloc(int, int, int); // expected-warning{{incompatible redeclaration of library function 'calloc' will be ignored}} \ |
| 10 | // expected-note{{'calloc' is a builtin with type 'void *(unsigned long, unsigned long)'}} |
| 11 | |
| 12 | void f1(void) { |
| 13 | return calloc(0, 0, 0); // expected-error{{too many arguments to function call}} |
| 14 | } |