1 // RUN: %clang_cc1 -emit-llvm %s -triple x86_64-windows-msvc -gcodeview -debug-info-kind=limited -o - | FileCheck %s
2
3 struct a {
4 ~a();
5 };
6 template <typename b> struct c : a {
7 c(void (b::*)());
8 };
9 struct B {
10 virtual void e();
11 };
d()12 c<B> *d() {
13 static c<B> f(&B::e);
14 return &f;
15 }
16
17 // CHECK: define internal void @"??__Ff@?1??d@@YAPEAU?$c@UB@@@@XZ@YAXXZ"()
18 // CHECK-SAME: !dbg ![[SUBPROGRAM:[0-9]+]] {
19 // CHECK: call void @"??1?$c@UB@@@@QEAA@XZ"(%struct.c* @"?f@?1??d@@YAPEAU?$c@UB@@@@XZ@4U2@A"), !dbg ![[LOCATION:[0-9]+]]
20 // CHECK: ![[SUBPROGRAM]] = distinct !DISubprogram(name: "`dynamic atexit destructor for 'f'"
21 // CHECK-SAME: flags: DIFlagArtificial
22 // CHECK: ![[LOCATION]] = !DILocation(line: 0, scope: ![[SUBPROGRAM]])
23