]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/CodeGen/2004-11-27-StaticFunctionRedeclare.c
Vendor import of clang release_38 branch r258549:
[FreeBSD/FreeBSD.git] / test / CodeGen / 2004-11-27-StaticFunctionRedeclare.c
1 // RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
2
3 // There should not be an unresolved reference to func here.  Believe it or not,
4 // the "expected result" is a function named 'func' which is internal and
5 // referenced by bar().
6
7 // This is PR244
8
9 // CHECK-LABEL: define {{.*}}void @bar(
10 // CHECK: call {{.*}} @func
11 // CHECK: define internal {{.*}}i32 @func(
12 static int func();
13 void bar() {
14   int func();
15   foo(func);
16 }
17 static int func(char** A, char ** B) {}