[clang][modules] Don't prevent translation of FW_Private includes when explicitly...
[llvm-project.git] / clang / test / CodeGenCXX / thunk-returning-memptr.cpp
blobaaa5c8605f23e75f2fb75135416afa194efcab1a
1 // RUN: %clang_cc1 -triple=i686 -emit-llvm -o - %s | FileCheck %s
4 struct X;
5 typedef void (X::*memptr)();
7 struct A {
8 virtual memptr f();
9 };
11 struct B {
12 virtual memptr f();
15 struct C : A, B {
16 C();
17 memptr f() override __attribute__((noinline)) { return nullptr; };
20 C::C() {}
22 // Make sure the member pointer is returned from the thunk via the return slot.
23 // Because of the tail call, the return value cannot be copied into a local
24 // alloca. (PR39901)
26 // CHECK-LABEL: define linkonce_odr void @_ZThn4_N1C1fEv(ptr noalias sret({ i32, i32 }) align 4 %agg.result, ptr noundef %this)
27 // CHECK: tail call void @_ZN1C1fEv(ptr sret({ i32, i32 }) align 4 %agg.result