[AMDGPU][True16][CodeGen] true16 codegen pattern for v_med3_u/i16 (#121850)
[llvm-project.git] / clang / test / CodeGenCXX / cfi-ms-vbase-derived-cast.cpp
blob6142ca56878fb4da8b86765d452e6d8a0e69b214
1 // RUN: %clang_cc1 -flto -flto-unit -emit-llvm -o - -triple=x86_64-pc-win32 %s -fsanitize=cfi-derived-cast -fsanitize-trap=cfi-derived-cast | FileCheck %s
3 struct foo {
4 virtual ~foo() {}
5 virtual void f() = 0;
6 };
8 template <typename T>
9 struct bar : virtual public foo {
10 void f() {
11 // CHECK: define{{.*}}@"?f@?$bar@Ubaz@@@@UEAAXXZ"
12 // Load "this", vbtable, vbase offset and vtable.
13 // CHECK: load
14 // CHECK: load
15 // CHECK: load
16 // CHECK: load
17 // CHECK: @llvm.type.test{{.*}}!"?AUfoo@@"
18 static_cast<T&>(*this);
22 struct baz : public bar<baz> {
23 virtual ~baz() {}
26 int main() {
27 baz *z = new baz;
28 z->f();