blob: cd75fcd076b42a03cb655a11ab1c178b5ba4cd0e [file] [log] [blame]
Stephen Hines176edba2014-12-01 14:53:08 -08001// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm-only -std=c++14 -emit-llvm -g %s -o - | FileCheck %s
2
Stephen Hines0e2c34f2015-03-23 12:09:02 -07003// CHECK: [[EMPTY:![0-9]*]] = !{}
Pirama Arumuga Nainar3ea9e332015-04-08 08:57:32 -07004// CHECK: !MDCompositeType(tag: DW_TAG_structure_type, name: "foo",
5// CHECK-SAME: elements: [[EMPTY]]
Stephen Hines176edba2014-12-01 14:53:08 -08006// FIXME: The context of this definition should be the CU/file scope, not the class.
Pirama Arumuga Nainar3ea9e332015-04-08 08:57:32 -07007// CHECK: !MDSubprogram(name: "func", {{.*}} scope: !"_ZTS3foo"
8// CHECK-SAME: type: [[SUBROUTINE_TYPE:![0-9]*]]
9// CHECK-SAME: isDefinition: true
10// CHECK-SAME: declaration: [[FUNC_DECL:![0-9]*]]
11// CHECK: [[SUBROUTINE_TYPE]] = !MDSubroutineType(types: [[TYPE_LIST:![0-9]*]])
Stephen Hines0e2c34f2015-03-23 12:09:02 -070012// CHECK: [[TYPE_LIST]] = !{[[INT:![0-9]*]]}
Pirama Arumuga Nainar3ea9e332015-04-08 08:57:32 -070013// CHECK: [[INT]] = !MDBasicType(name: "int"
14// CHECK: [[FUNC_DECL]] = !MDSubprogram(name: "func",
15// CHECK-SAME: scope: !"_ZTS3foo"
16// CHECK-SAME: type: [[SUBROUTINE_TYPE]]
17// CHECK-SAME: isDefinition: false
David Blaikie91296482013-05-24 21:24:35 +000018
19struct foo {
Stephen Hines176edba2014-12-01 14:53:08 -080020 static auto func();
David Blaikie91296482013-05-24 21:24:35 +000021};
22
23foo f;
Stephen Hines176edba2014-12-01 14:53:08 -080024
25auto foo::func() {
26 return 1;
27}