blob: 117d277c95e6417551b9954b292f567f4b8b5678 [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 Hines176edba2014-12-01 14:53:08 -080026// CHECK: call dereferenceable({{[0-9]+}}) %struct.A* @_ZN1BcvR1AEv
27// CHECK: call dereferenceable({{[0-9]+}}) %struct.A* @_ZN1BcvR1AEv