llvm-project/clang/test/CodeGenCXX/microsoft-abi-vmemptr-fastcall.cpp
Manuel Klimek aad3b8486d Revert "[MS ABI] Allow fastcall member function pointers to get CodeGen'd"
Revert "[MS ABI] Allow memfn pointers with unconvertible types to be formed"

This reverts r239499 and r239503; the former breaks tests [1] and the
latter is based on the former.

[1]
http://lab.llvm.org:8080/green/job/clang-stage2-configure-Rlto_check/4473/testReport/Clang/CodeGenCXX/microsoft_abi_virtual_member_pointers_cpp/

llvm-svn: 239511
2015-06-11 07:54:35 +00:00

12 lines
387 B
C++

// RUN: %clang_cc1 -fms-extensions -triple i686-pc-windows-msvc %s -emit-llvm-only -verify
// We reject this because LLVM doesn't forward the second regparm through the
// thunk.
struct A {
virtual void __fastcall f(int a, int b); // expected-error {{cannot compile this pointer to fastcall virtual member function yet}}
};
void (__fastcall A::*doit())(int, int) {
return &A::f;
}