[clang-cl] Ignore /Wv and /Wv:17 flags
[llvm-project.git] / clang / test / CodeGenCXX / microsoft-abi-structors-alias.cpp
blob38f7b4c8b58ddc346008d603108346b36736e4f0
1 // RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 -fno-rtti -mconstructor-aliases -O1 -disable-llvm-passes | FileCheck %s
3 namespace test1 {
4 template <typename T> class A {
5 ~A() {}
6 };
7 template class A<char>;
8 // CHECK-DAG: define weak_odr dso_local x86_thiscallcc void @"??1?$A@D@test1@@AAE@XZ"
11 namespace test2 {
12 struct A {
13 virtual ~A();
15 struct B : A {
16 B();
17 virtual ~B();
20 A::~A() {}
21 B::~B() {}
22 void foo() {
23 B b;
25 // CHECK-DAG: @"??1B@test2@@UAE@XZ" = dso_local unnamed_addr alias void (%"struct.test2::B"*), bitcast (void (%"struct.test2::A"*)* @"??1A@test2@@UAE@XZ" to void (%"struct.test2::B"*)*)
28 namespace test3 {
29 struct A { virtual ~A(); };
30 A::~A() {}
32 // CHECK-DAG: define dso_local x86_thiscallcc void @"??1A@test3@@UAE@XZ"(
33 namespace test3 {
34 template <typename T>
35 struct B : A {
36 virtual ~B() { }
38 template struct B<int>;
40 // This has to be weak, and emitting weak aliases is fragile, so we don't do the
41 // aliasing.
42 // CHECK-DAG: define weak_odr dso_local x86_thiscallcc void @"??1?$B@H@test3@@UAE@XZ"(