xref: /aosp_15_r20/external/clang/test/CodeGen/2004-11-27-StaticFunctionRedeclare.c (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
2*67e74705SXin Li 
3*67e74705SXin Li // There should not be an unresolved reference to func here.  Believe it or not,
4*67e74705SXin Li // the "expected result" is a function named 'func' which is internal and
5*67e74705SXin Li // referenced by bar().
6*67e74705SXin Li 
7*67e74705SXin Li // This is PR244
8*67e74705SXin Li 
9*67e74705SXin Li // CHECK-LABEL: define {{.*}}void @bar(
10*67e74705SXin Li // CHECK: call {{.*}} @func
11*67e74705SXin Li // CHECK: define internal {{.*}}i32 @func(
12*67e74705SXin Li static int func();
bar()13*67e74705SXin Li void bar() {
14*67e74705SXin Li   int func();
15*67e74705SXin Li   foo(func);
16*67e74705SXin Li }
func(char ** A,char ** B)17*67e74705SXin Li static int func(char** A, char ** B) {}
18