21 lines · cpp
1// RUN: %clang_cc1 %s -triple=%itanium_abi_triple -debug-info-kind=limited -debug-forward-template-params -emit-llvm -o - | FileCheck --check-prefix=CHILD %s2// RUN: %clang_cc1 %s -triple=%itanium_abi_triple -debug-info-kind=limited -emit-llvm -o - | FileCheck --check-prefix=NONE %s3// A DWARF forward declaration of a template instantiation should have template4// parameter children (if we ask for them).5 6template<typename T> class A;7A<int> *p;8 9// CHILD: !DICompositeType(tag: DW_TAG_class_type, name: "A<int>"10// CHILD-SAME: flags: DIFlagFwdDecl11// CHILD-SAME: templateParams: [[PARAM_LIST:![0-9]*]]12// CHILD: [[PARAM_LIST]] = !{[[PARAM:![0-9]*]]}13// CHILD: [[PARAM]] = !DITemplateTypeParameter(name: "T",14// CHILD-SAME: type: [[BTYPE:![0-9]*]]15// CHILD: [[BTYPE]] = !DIBasicType(name: "int"16 17// NONE: !DICompositeType(tag: DW_TAG_class_type, name: "A<int>"18// NONE-SAME: flags: DIFlagFwdDecl19// NONE-NOT: templateParams:20// NONE-SAME: )21