llvm-project/llvm/test/FrontendC++/2003-12-08-ArrayOfPtrToMemb...

13 lines
230 B
C++
Raw Normal View History

// RUN: %llvmgxx -S %s -o - | llvm-as -o /dev/null
2004-11-07 06:29:57 +08:00
2003-12-08 14:18:37 +08:00
struct Evil {
void fun ();
};
int foo();
typedef void (Evil::*memfunptr) ();
static memfunptr jumpTable[] = { &Evil::fun };
void Evil::fun() {
(this->*jumpTable[foo()]) ();
}