50 lines · cpp
1// RUN: %clang_cc1 -fcxx-exceptions -triple=x86_64-windows-msvc -emit-llvm %s -o - | FileCheck %s2 3class F {4public:5 F(wchar_t *);6};7using a = F;8struct A {};9struct b {10 b(a, F, A);11};12template <typename, typename> struct c : b {13 c(const a &p1, const A &d) : b(p1, 0, d) {}14};15template <typename e> struct B : c<e, b> {16 using c<e, b>::c;17};18class f {19public:20 f(...);21}22 23typedef g;24class C {25public:26 C(g, f);27};28static wchar_t h;29class D {30public:31 static C E();32};33 34C D::E() {35 C i(B<bool>(&h, {}), f());36 return i;37}38 39// Inheriting ctor has internal linkage without comdat.40 41// CHECK-LABEL: define internal noundef ptr @"??0?$B@_N@@QEAA@AEBVF@@AEBUA@@@Z"42// CHECK-NOT:comdat43// CHECK-SAME: {{\{$}}44 45// non-inheriting ctro should has linkonce_odr with comdat attribute.46 47// CHECK-LABEL: define linkonce_odr dso_local noundef ptr @"??0?$c@_NUb@@@@QEAA@AEBVF@@AEBUA@@@Z"48// CHECK:comdat49// CHECK-SAME: {{\{$}}50