// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s

int g();

int foo(int i) {
  return g(i);
}

int g(int i) {
  return g(i);
}

// rdar://6110827
typedef void T(void);
void test3(T f) {
  f();
}

int a(int);
int a() {return 1;}

// RUN: grep 'define void @f0()' %t
void f0() {}

void f1();
// RUN: grep 'call void @f1()' %t
void f2(void) {
  f1(1, 2, 3);
}
// RUN: grep 'define void @f1()' %t
void f1() {}

// RUN: grep 'define .* @f3' %t | not grep -F '...'
struct foo { int X, Y, Z; } f3() {
  while (1) {}
}

// PR4423 - This shouldn't crash in codegen
void f4() {}
void f5() { f4(42); }

// Qualifiers on parameter types shouldn't make a difference.
static void f6(const float f, const float g) {
}
void f7(float f, float g) {
  f6(f, g);
// CHECK: define void @f7(float{{.*}}, float{{.*}})
// CHECK: call void @f6(float{{.*}}, float{{.*}})
}

// RUN: %clang_cc1 %s -emit-llvm -o - -verify | FileCheck %s

int g();

int foo(int i) {
  return g(i);
}

int g(int i) {
  return g(i);
}

// rdar://6110827
typedef void T(void);
void test3(T f) {
  f();
}

int a(int);
int a() {return 1;}

void f0() {}
// CHECK: define void @f0()

void f1();
void f2(void) {
// CHECK: call void @f1()
  f1(1, 2, 3);
}
// CHECK: define void @f1()
void f1() {}

// CHECK: define {{.*}} @f3()
struct foo { int X, Y, Z; } f3() {
  while (1) {}
}

// PR4423 - This shouldn't crash in codegen
void f4() {}
void f5() { f4(42); } //expected-warning {{too many arguments}}

// Qualifiers on parameter types shouldn't make a difference.
static void f6(const float f, const float g) {
}
void f7(float f, float g) {
  f6(f, g);
// CHECK: define void @f7(float{{.*}}, float{{.*}})
// CHECK: call void @f6(float{{.*}}, float{{.*}})
}

Fix test case and convert fully to FileCheck.
Fix test case and convert fully to FileCheck.



git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@97032 91177308-0d34-0410-b5e6-96231b3b80d8
