blob: 333e38861e3d05020148c8faced6507428ca9b92 [file] [log] [blame]
Rafael Espindola6ffd88d2013-12-03 14:35:42 +00001// 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 Jahanian9ce90d12009-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
Nick Lewycky9b46eb82014-05-28 09:56:42 +000026// CHECK: call nonnull %struct.A* @_ZN1BcvR1AEv
27// CHECK: call nonnull %struct.A* @_ZN1BcvR1AEv