blob: cd99b54553189f524dc5833c0174a054550e2f26 [file] [log] [blame]
Daniel Dunbarffd408a2009-03-24 02:24:46 +00001// RUN: clang-cc -fsyntax-only -verify %s
Douglas Gregor4d6b1022009-02-17 03:23:10 +00002
3// PR3592
4static void* malloc(int);
5static void* malloc(int size) {
6 return ((void*)0); /*do not use heap in this file*/
7}
Douglas Gregor6b3cca62009-02-18 22:00:45 +00008
9void *calloc(int, int, int); // expected-warning{{incompatible redeclaration of library function 'calloc' will be ignored}} \
Douglas Gregor7de04c02009-02-19 00:03:13 +000010// expected-note{{'calloc' is a builtin with type 'void *}}
Douglas Gregor6b3cca62009-02-18 22:00:45 +000011
12void f1(void) {
Douglas Gregor1e23a5f2009-03-23 17:47:24 +000013 calloc(0, 0, 0);
Douglas Gregor6b3cca62009-02-18 22:00:45 +000014}