xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenCXX/debug-info-method.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -emit-llvm -std=c++11 -g %s -o - | FileCheck %s
2*f4a2713aSLionel Sambuc // CHECK: metadata !"_ZTS1A"} ; [ DW_TAG_class_type ] [A]
3*f4a2713aSLionel Sambuc // CHECK: metadata !"_ZN1A3fooEiS_3$_0", {{.*}} [protected]
4*f4a2713aSLionel Sambuc // CHECK: ![[THISTYPE:[0-9]+]] = {{.*}} ; [ DW_TAG_pointer_type ] {{.*}} [artificial] [from _ZTS1A]
5*f4a2713aSLionel Sambuc // CHECK: DW_TAG_ptr_to_member_type
6*f4a2713aSLionel Sambuc // CHECK: {{.*}}metadata ![[MEMFUNTYPE:[0-9]+]], metadata !{{.*}}} ; [ DW_TAG_ptr_to_member_type ] {{.*}} [from ]
7*f4a2713aSLionel Sambuc // CHECK: ![[MEMFUNTYPE]] = {{.*}}metadata ![[MEMFUNARGS:[0-9]+]], i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] {{.*}} [from ]
8*f4a2713aSLionel Sambuc // CHECK: ![[MEMFUNARGS]] = {{.*}}, metadata ![[THISTYPE]],
9*f4a2713aSLionel Sambuc // CHECK: ""{{.*}}DW_TAG_arg_variable
10*f4a2713aSLionel Sambuc // CHECK: ""{{.*}}DW_TAG_arg_variable
11*f4a2713aSLionel Sambuc // CHECK: ""{{.*}}DW_TAG_arg_variable
12*f4a2713aSLionel Sambuc union {
13*f4a2713aSLionel Sambuc   int a;
14*f4a2713aSLionel Sambuc   float b;
15*f4a2713aSLionel Sambuc } u;
16*f4a2713aSLionel Sambuc 
17*f4a2713aSLionel Sambuc class A {
18*f4a2713aSLionel Sambuc protected:
19*f4a2713aSLionel Sambuc   void foo(int, A, decltype(u));
20*f4a2713aSLionel Sambuc };
21*f4a2713aSLionel Sambuc 
22*f4a2713aSLionel Sambuc void A::foo(int, A, decltype(u)) {
23*f4a2713aSLionel Sambuc }
24*f4a2713aSLionel Sambuc 
25*f4a2713aSLionel Sambuc A a;
26*f4a2713aSLionel Sambuc 
27*f4a2713aSLionel Sambuc int A::*x = 0;
28*f4a2713aSLionel Sambuc int (A::*y)(int) = 0;
29