virtual-functions-incomplete-types.cpp revision a5728872c7702ddd09537c95bc3cbd20e1f2fb09
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: declare void @_ZN1B1gEv() 13 14struct C; 15 16struct D { 17 virtual void f(); 18 virtual C g(); 19}; 20 21void D::f() { } 22 23struct C { 24 int a; 25}; 26 27// CHECK: define i64 @_ZN1D1gEv(%struct.B* %this) 28C D::g() { 29 return C(); 30} 31