1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambuc struct Foo { 4*f4a2713aSLionel Sambuc Foo(); 5*f4a2713aSLionel Sambuc Foo(const Foo&); 6*f4a2713aSLionel Sambuc }; 7*f4a2713aSLionel Sambuc 8*f4a2713aSLionel Sambuc struct Bar { 9*f4a2713aSLionel Sambuc Bar(); 10*f4a2713aSLionel Sambuc operator const Foo&() const; 11*f4a2713aSLionel Sambuc }; 12*f4a2713aSLionel Sambuc 13*f4a2713aSLionel Sambuc void f(Foo); 14*f4a2713aSLionel Sambuc 15*f4a2713aSLionel Sambuc // CHECK-LABEL: define void @_Z1g3Foo(%struct.Foo* %foo) g(Foo foo)16*f4a2713aSLionel Sambucvoid g(Foo foo) { 17*f4a2713aSLionel Sambuc // CHECK: call void @_ZN3BarC1Ev 18*f4a2713aSLionel Sambuc // CHECK: @_ZNK3BarcvRK3FooEv 19*f4a2713aSLionel Sambuc // CHECK: call void @_Z1f3Foo 20*f4a2713aSLionel Sambuc f(Bar()); 21*f4a2713aSLionel Sambuc // CHECK: call void @_ZN3FooC1Ev 22*f4a2713aSLionel Sambuc // CHECK: call void @_Z1f3Foo 23*f4a2713aSLionel Sambuc f(Foo()); 24*f4a2713aSLionel Sambuc // CHECK: call void @_ZN3FooC1ERKS_ 25*f4a2713aSLionel Sambuc // CHECK: call void @_Z1f3Foo 26*f4a2713aSLionel Sambuc f(foo); 27*f4a2713aSLionel Sambuc // CHECK: ret 28*f4a2713aSLionel Sambuc } 29*f4a2713aSLionel Sambuc 30