[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGenCXX / cfi-ms-vbase-nvcall.cpp
blobd4232555c9d8a6342967b5c20e8ada19b5e67e9d
1 // RUN: %clang_cc1 -flto -flto-unit -emit-llvm -o - -triple=x86_64-pc-win32 %s -fsanitize=cfi-nvcall -fsanitize-trap=cfi-nvcall | 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() {}
13 struct baz : public bar<baz> {
14 virtual ~baz() {}
15 void g() {}
18 void f(baz *z) {
19 // CHECK: define{{.*}}@"?f@@YAXPEAUbaz@@@Z"
20 // Load z, vbtable, vbase offset and vtable.
21 // CHECK: load
22 // CHECK: load
23 // CHECK: load
24 // CHECK: load
25 // CHECK: @llvm.type.test{{.*}}!"?AUfoo@@"
26 z->g();