1 // RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm-only -std=c++14 -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s
2 
3 // CHECK: imports: [[IMPS:![0-9]*]]
4 // CHECK: [[EMPTY:![0-9]*]] = !{}
5 
6 // CHECK: [[IMPS]] = !{[[IMP:![0-9]*]]}
7 // CHECK: [[IMP]] = !DIImportedEntity(
8 // CHECK-SAME: entity: [[F3:![0-9]*]]
9 // CHECK: [[F3]] = distinct !DISubprogram(name: "f3"
10 // CHECK-SAME:          type: [[SUBROUTINE_TYPE:![0-9]*]]
11 // CHECK: [[SUBROUTINE_TYPE]] = !DISubroutineType(types: [[TYPE_LIST:![0-9]*]])
12 // CHECK: [[TYPE_LIST]] = !{[[INT:![0-9]*]]}
13 // CHECK: [[INT]] = !DIBasicType(name: "int"
14 
15 // CHECK: [[FOO:![0-9]+]] = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "foo",
16 // CHECK-SAME:             elements: [[EMPTY]]
17 
18 // FIXME: The context of this definition should be the CU/file scope, not the class.
19 // CHECK: !DISubprogram(name: "func", {{.*}} scope: [[FOO]]
20 // CHECK-SAME:          type: [[SUBROUTINE_TYPE]]
21 // CHECK-SAME:          DISPFlagDefinition
22 // CHECK-SAME:          declaration: [[FUNC_DECL:![0-9]*]]
23 // CHECK: [[FUNC_DECL]] = !DISubprogram(name: "func",
24 // CHECK-SAME:                          scope: [[FOO]]
25 // CHECK-SAME:                          type: [[SUBROUTINE_TYPE]]
26 // CHECK-SAME:                          spFlags: 0
27 
28 struct foo {
29   static auto func();
30 };
31 
32 foo f;
33 
func()34 auto foo::func() {
35   return 1;
36 }
37 
38 namespace ns {
39 auto f2();
f3()40 auto f3() {
41   return 0;
42 }
43 }
44 using ns::f2;
45 using ns::f3;
46