blob: a6e2e30dd59bb22486f881f115b4f7be84187c6d [file] [log] [blame]
Eric Christopher2368b6a2011-08-20 00:09:39 +00001// RUN: %clang_cc1 -emit-llvm %s -o -
2
3struct A {
4 virtual void Method() = 0;
5};
6
7struct B : public A {
8 virtual void Method() { }
9};
10
11typedef void (A::*fn_type_a)(void);
12typedef void (B::*fn_type_b)(void);
13
14int main(int argc, char **argv)
15{
16 fn_type_a f = reinterpret_cast<fn_type_a>(&B::Method);
17 fn_type_b g = reinterpret_cast<fn_type_b>(f);
18 B b;
19 (b.*g)();
20 return 0;
21}