2013-07-04 22:28:33 +08:00
|
|
|
// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
|
2011-07-27 06:17:02 +08:00
|
|
|
|
|
|
|
// There should not be an unresolved reference to func here. Believe it or not,
|
2013-07-04 22:28:33 +08:00
|
|
|
// the "expected result" is a function named 'func' which is internal and
|
2011-07-27 06:17:02 +08:00
|
|
|
// referenced by bar().
|
|
|
|
|
|
|
|
// This is PR244
|
|
|
|
|
2015-06-30 01:29:50 +08:00
|
|
|
// CHECK-LABEL: define {{.*}}void @bar(
|
2013-07-04 22:28:33 +08:00
|
|
|
// CHECK: call {{.*}} @func
|
2013-07-04 23:29:20 +08:00
|
|
|
// CHECK: define internal {{.*}}i32 @func(
|
2011-07-27 06:17:02 +08:00
|
|
|
static int func();
|
|
|
|
void bar() {
|
|
|
|
int func();
|
|
|
|
foo(func);
|
|
|
|
}
|
|
|
|
static int func(char** A, char ** B) {}
|