================
@@ -4189,8 +4189,13 @@ llvm::DICompositeType
*CGDebugInfo::CreateLimitedType(const RecordType *Ty) {
llvm::MDNode::replaceWithDistinct(llvm::TempDICompositeType(RealDecl));
break;
}
-
- RegionMap[Ty->getDecl()].reset(RealDecl);
+ if (auto *CTSD = dyn_cast<ClassTemplateSpecializationDecl>(Ty->getDecl())) {
+ CXXRecordDecl *TemplateDecl =
+ CTSD->getSpecializedTemplate()->getTemplatedDecl();
+ RegionMap[TemplateDecl].reset(RealDecl);
+ } else {
+ RegionMap[Ty->getDecl()].reset(RealDecl);
+ }
----------------
Michael137 wrote:
I'd still like to understand if there is a way for us to grab the
`ClassTemplateSpecializationDecl` from the non-template dependent
`TypedefDecl`. @AaronBallman any idea if that's possible? Specifically my
comments
[here](https://github.com/llvm/llvm-project/pull/146729#pullrequestreview-3019468533)
and
[here](https://github.com/llvm/llvm-project/pull/146729#issuecomment-3072970267)
https://github.com/llvm/llvm-project/pull/146729
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits