blob: 333e38861e3d05020148c8faced6507428ca9b92 [file] [log] [blame]
Stephen Hines651f13c2014-04-23 16:59:28 -07001// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm %s -o - | \
2// RUN: FileCheck %s
3// RUN: %clang_cc1 -triple i386-apple-darwin -emit-llvm %s -o - | \
4// RUN: FileCheck %s
Fariborz Jahanian8f489d62009-09-23 22:34:00 +00005
6struct A {};
7
8struct B
9{
10 operator A&();
11};
12
13
14struct D : public B {
15 operator A();
16};
17
18extern B f();
19extern D d();
20
21int main() {
22 const A& rca = f();
23 const A& rca2 = d();
24}
25
Stephen Hinesc568f1e2014-07-21 00:47:37 -070026// CHECK: call nonnull %struct.A* @_ZN1BcvR1AEv
27// CHECK: call nonnull %struct.A* @_ZN1BcvR1AEv