1 // RUN: clang-cc -triple x86_64-apple-darwin -std=c++0x -S %s -o %t-64.s
2 // RUN: FileCheck -check-prefix LP64 --input-file=%t-64.s %s
3 // RUN: clang-cc -triple i386-apple-darwin -std=c++0x -S %s -o %t-32.s
4 // RUN: FileCheck -check-prefix LP32 --input-file=%t-32.s %s
5 // 13.3.3.2 Ranking implicit conversion sequences
7 extern "C" int printf(...);
11 bool foo(int* arg) const;
14 bool A::foo(int* arg) const {
15 printf("A::foo(%d)\n", *arg);
20 void bf() { printf("B::bf called\n"); }
23 struct C : public B { };
25 // conversion of B::* to C::* is better than conversion of A::* to C::*
26 typedef void (A::*pmfa)();
27 typedef void (B::*pmfb)();
28 typedef void (C::*pmfc)();
49 bool (A::*pmf)(int*) const;
51 B1(int i) : pmf(&A::foo), im(i) {
52 ((A*)this->*pmf)(&im);
66 // CHECK-LP64: call __ZN1XcvM1BFvvEEv
67 // CHECK-LP64: call __Z1gM1CFvvE
69 // CHECK-LP32: call L__ZN1XcvM1BFvvEEv
70 // CHECK-LP32: call __Z1gM1CFvvE