[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Sema / implicit-builtin-redecl.c
blob341ac09a0fdbb2d28f8507ddd292f053d0993949
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 // PR3592
4 static void* malloc(int);
5 static void* malloc(int size) {
6 return ((void*)0); /*do not use heap in this file*/
9 void *calloc(int, int, int); // expected-warning{{incompatible redeclaration of library function 'calloc'}} \
10 // expected-note{{'calloc' is a builtin with type 'void *}}
12 void f1(void) {
13 calloc(0, 0, 0);
16 void f2(void) {
17 int index = 1;
20 static int index;
22 int f3(void) {
23 return index << 2;
26 typedef int rindex;