xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenCXX/debug-info-cxx1y.cpp (revision 0a6a1f1d05b60e214de2f05a7310ddd1f0e590e7)
1*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm-only -std=c++14 -emit-llvm -g %s -o - | FileCheck %s
2*0a6a1f1dSLionel Sambuc 
3*0a6a1f1dSLionel Sambuc // CHECK: [[EMPTY:![0-9]*]] = !{}
4*0a6a1f1dSLionel Sambuc // CHECK: \00foo\00{{.*}}, [[EMPTY]], {{.*}}} ; [ DW_TAG_structure_type ]
5*0a6a1f1dSLionel Sambuc // FIXME: The context of this definition should be the CU/file scope, not the class.
6*0a6a1f1dSLionel Sambuc // CHECK: !"_ZTS3foo", [[SUBROUTINE_TYPE:![0-9]*]], {{.*}}, [[FUNC_DECL:![0-9]*]], {{![0-9]*}}} ; [ DW_TAG_subprogram ] {{.*}} [def] [func]
7*0a6a1f1dSLionel Sambuc // CHECK: [[SUBROUTINE_TYPE]] = {{.*}}, [[TYPE_LIST:![0-9]*]],
8*0a6a1f1dSLionel Sambuc // CHECK: [[TYPE_LIST]] = !{[[INT:![0-9]*]]}
9*0a6a1f1dSLionel Sambuc // CHECK: [[INT]] = {{.*}} ; [ DW_TAG_base_type ] [int]
10*0a6a1f1dSLionel Sambuc // CHECK: [[FUNC_DECL]] = {{.*}}, !"_ZTS3foo", [[SUBROUTINE_TYPE]], {{.*}}} ; [ DW_TAG_subprogram ] {{.*}} [func]
11f4a2713aSLionel Sambuc 
12f4a2713aSLionel Sambuc struct foo {
13*0a6a1f1dSLionel Sambuc   static auto func();
14f4a2713aSLionel Sambuc };
15f4a2713aSLionel Sambuc 
16f4a2713aSLionel Sambuc foo f;
17*0a6a1f1dSLionel Sambuc 
func()18*0a6a1f1dSLionel Sambuc auto foo::func() {
19*0a6a1f1dSLionel Sambuc   return 1;
20*0a6a1f1dSLionel Sambuc }
21