xref: /llvm-project/clang/test/CodeGenCXX/debug-info-artificial-arg.cpp (revision 383f8413cf901c8ea026318b4f95ab00107fd38c)
13459ce2eSDouglas Katzman // RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -triple x86_64-apple-darwin %s -o - | FileCheck %s
239e39c8eSEric Christopher 
339e39c8eSEric Christopher template<class X> class B {
439e39c8eSEric Christopher public:
539e39c8eSEric Christopher   explicit B(X* p = 0);
639e39c8eSEric Christopher };
739e39c8eSEric Christopher 
839e39c8eSEric Christopher class A
939e39c8eSEric Christopher {
1039e39c8eSEric Christopher public:
A(int value)1139e39c8eSEric Christopher   A(int value) : m_a_value(value) {};
A(int value,A * client_A)1239e39c8eSEric Christopher   A(int value, A* client_A) : m_a_value (value), m_client_A (client_A) {}
1339e39c8eSEric Christopher 
~A()1439e39c8eSEric Christopher   virtual ~A() {}
1539e39c8eSEric Christopher 
1639e39c8eSEric Christopher private:
1739e39c8eSEric Christopher   int m_a_value;
1839e39c8eSEric Christopher   B<A> m_client_A;
1939e39c8eSEric Christopher };
2039e39c8eSEric Christopher 
main(int argc,char ** argv)2139e39c8eSEric Christopher int main(int argc, char **argv) {
2239e39c8eSEric Christopher   A reallyA (500);
2339e39c8eSEric Christopher }
2439e39c8eSEric Christopher 
25f9521b0bSDuncan P. N. Exon Smith // CHECK: ![[CLASSTYPE:.*]] = distinct !DICompositeType(tag: DW_TAG_class_type, name: "A",
26f04be1fbSDuncan P. N. Exon Smith // CHECK-SAME:                                 identifier: "_ZTS1A"
27*383f8413SDuncan P. N. Exon Smith // CHECK: ![[ARTARG:.*]] = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: ![[CLASSTYPE]],{{.*}} DIFlagArtificial
28*383f8413SDuncan P. N. Exon Smith // CHECK: !DISubprogram(name: "A", scope: ![[CLASSTYPE]]
29f04be1fbSDuncan P. N. Exon Smith // CHECK-SAME:          line: 12
30f04be1fbSDuncan P. N. Exon Smith // CHECK-SAME:          DIFlagPublic
319dd4e4e6SDuncan P. N. Exon Smith // CHECK: !DISubroutineType(types: [[FUNCTYPE:![0-9]*]])
32b3a66691SDuncan P. N. Exon Smith // CHECK: [[FUNCTYPE]] = !{null, ![[ARTARG]], !{{.*}}, !{{.*}}}
33