Home | History | Annotate | Download | only in CodeGenCXX
      1 // 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
      5 
      6 struct A {};
      7 
      8 struct B
      9 {
     10   operator A&();
     11 };
     12 
     13 
     14 struct D : public B {
     15   operator A();
     16 };
     17 
     18 extern B f();
     19 extern D d();
     20 
     21 int main() {
     22 	const A& rca = f();
     23 	const A& rca2 = d();
     24 }
     25 
     26 // CHECK: call dereferenceable({{[0-9]+}}) %struct.A* @_ZN1BcvR1AEv
     27 // CHECK: call dereferenceable({{[0-9]+}}) %struct.A* @_ZN1BcvR1AEv
     28