1aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher// RUN: %clang_cc1 -emit-llvm %s -o - 2aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher 3aeac10e7b074d87522ccc5fad919417092971c57Eric Christopherstruct Evil { 4aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher void fun (); 5aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher}; 6aeac10e7b074d87522ccc5fad919417092971c57Eric Christopherint foo(); 7aeac10e7b074d87522ccc5fad919417092971c57Eric Christophertypedef void (Evil::*memfunptr) (); 8aeac10e7b074d87522ccc5fad919417092971c57Eric Christopherstatic memfunptr jumpTable[] = { &Evil::fun }; 9aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher 10aeac10e7b074d87522ccc5fad919417092971c57Eric Christophervoid Evil::fun() { 11aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher (this->*jumpTable[foo()]) (); 12aeac10e7b074d87522ccc5fad919417092971c57Eric Christopher} 13