blob: 38de271b61328d1667a88cc9924f855c9d15e41e [file] [log] [blame]
Eric Christopheraeac10e2011-08-20 00:17:18 +00001// RUN: %clang_cc1 -emit-llvm %s -o -
2
3struct Evil {
4 void fun ();
5};
6int foo();
7typedef void (Evil::*memfunptr) ();
8static memfunptr jumpTable[] = { &Evil::fun };
9
10void Evil::fun() {
11 (this->*jumpTable[foo()]) ();
12}