diff --git a/llvm/test/Regression/C++Frontend/2003-12-08-ArrayOfPtrToMemberFunc.cpp b/llvm/test/Regression/C++Frontend/2003-12-08-ArrayOfPtrToMemberFunc.cpp new file mode 100644 index 000000000000..b1677bc203d5 --- /dev/null +++ b/llvm/test/Regression/C++Frontend/2003-12-08-ArrayOfPtrToMemberFunc.cpp @@ -0,0 +1,10 @@ +struct Evil { + void fun (); +}; +int foo(); +typedef void (Evil::*memfunptr) (); +static memfunptr jumpTable[] = { &Evil::fun }; + +void Evil::fun() { + (this->*jumpTable[foo()]) (); +}