Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 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 |
Fariborz Jahanian | 8f489d6 | 2009-09-23 22:34:00 +0000 | [diff] [blame] | 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 | |
Stephen Hines | 176edba | 2014-12-01 14:53:08 -0800 | [diff] [blame] | 26 | // CHECK: call dereferenceable({{[0-9]+}}) %struct.A* @_ZN1BcvR1AEv |
| 27 | // CHECK: call dereferenceable({{[0-9]+}}) %struct.A* @_ZN1BcvR1AEv |