2013-12-03 22:35:42 +08:00
|
|
|
// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm %s -o - | \
|
|
|
|
// RUN: FileCheck %s
|
|
|
|
// RUN: %clang_cc1 -triple i386-apple-darwin -emit-llvm %s -o - | \
|
|
|
|
// RUN: FileCheck %s
|
2009-09-24 06:34:00 +08:00
|
|
|
|
|
|
|
struct A {};
|
|
|
|
|
|
|
|
struct B
|
|
|
|
{
|
|
|
|
operator A&();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
struct D : public B {
|
|
|
|
operator A();
|
|
|
|
};
|
|
|
|
|
|
|
|
extern B f();
|
|
|
|
extern D d();
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
const A& rca = f();
|
|
|
|
const A& rca2 = d();
|
|
|
|
}
|
|
|
|
|
2014-07-18 23:52:10 +08:00
|
|
|
// CHECK: call dereferenceable({{[0-9]+}}) %struct.A* @_ZN1BcvR1AEv
|
|
|
|
// CHECK: call dereferenceable({{[0-9]+}}) %struct.A* @_ZN1BcvR1AEv
|