Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenCXX / ms-inheriting-ctor.cpp
blob6c6cdcf2c358c2936aa3772a0326da4dba340102
1 // RUN: %clang_cc1 -fcxx-exceptions -triple=x86_64-windows-msvc -emit-llvm %s -o - | FileCheck %s
3 class F {
4 public:
5 F(wchar_t *);
6 };
7 using a = F;
8 struct A {};
9 struct b {
10 b(a, F, A);
12 template <typename, typename> struct c : b {
13 c(const a &p1, const A &d) : b(p1, 0, d) {}
15 template <typename e> struct B : c<e, b> {
16 using c<e, b>::c;
18 class f {
19 public:
20 f(...);
23 typedef g;
24 class C {
25 public:
26 C(g, f);
28 static wchar_t h;
29 class D {
30 public:
31 static C E();
34 C D::E() {
35 C i(B<bool>(&h, {}), f());
36 return i;
39 // Inheriting ctor has internal linkage without comdat.
41 // CHECK-LABEL: define internal noundef ptr @"??0?$B@_N@@QEAA@AEBVF@@AEBUA@@@Z"
42 // CHECK-NOT:comdat
43 // CHECK-SAME: {{\{$}}
45 // non-inheriting ctro should has linkonce_odr with comdat attribute.
47 // CHECK-LABEL: define linkonce_odr dso_local noundef ptr @"??0?$c@_NUb@@@@QEAA@AEBVF@@AEBUA@@@Z"
48 // CHECK:comdat
49 // CHECK-SAME: {{\{$}}