1// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
2
3struct A;
4
5struct B {
6  virtual void f();
7  virtual A g();
8};
9
10void B::f() { }
11
12// CHECK-LABEL: define i32 @_ZN1D1gEv(%struct.D* %this)
13// CHECK: declare void @_ZN1B1gEv()
14
15struct C;
16
17struct D {
18  virtual void f();
19  virtual C g();
20};
21
22void D::f() { }
23
24struct C {
25  int a;
26};
27
28C D::g() {
29  return C();
30}
31