New testcase for PR165
authorChris Lattner <sabre@nondot.org>
Mon, 8 Dec 2003 06:18:37 +0000 (06:18 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 8 Dec 2003 06:18:37 +0000 (06:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10314 91177308-0d34-0410-b5e6-96231b3b80d8

test/C++Frontend/2003-12-08-ArrayOfPtrToMemberFunc.cpp [new file with mode: 0644]

diff --git a/test/C++Frontend/2003-12-08-ArrayOfPtrToMemberFunc.cpp b/test/C++Frontend/2003-12-08-ArrayOfPtrToMemberFunc.cpp
new file mode 100644 (file)
index 0000000..b1677bc
--- /dev/null
@@ -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()]) ();
+}