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