@@ -944,6 +944,9 @@ void JSONNodeDumper::VisitVarDecl(const VarDecl *VD) {
944944 }
945945 }
946946 attributeOnlyIfTrue (" isParameterPack" , VD->isParameterPack ());
947+ if (const auto *Instance = VD->getTemplateInstantiationPattern ())
948+ JOS.attribute (" TemplateInstantiationPattern" ,
949+ createPointerRepresentation (Instance));
947950}
948951
949952void JSONNodeDumper::VisitFieldDecl (const FieldDecl *FD) {
@@ -975,6 +978,10 @@ void JSONNodeDumper::VisitFunctionDecl(const FunctionDecl *FD) {
975978
976979 if (StringLiteral *Msg = FD->getDeletedMessage ())
977980 JOS.attribute (" deletedMessage" , Msg->getString ());
981+
982+ if (const auto *Instance = FD->getTemplateInstantiationPattern ())
983+ JOS.attribute (" TemplateInstantiationPattern" ,
984+ createPointerRepresentation (Instance));
978985}
979986
980987void JSONNodeDumper::VisitEnumDecl (const EnumDecl *ED) {
@@ -984,6 +991,9 @@ void JSONNodeDumper::VisitEnumDecl(const EnumDecl *ED) {
984991 if (ED->isScoped ())
985992 JOS.attribute (" scopedEnumTag" ,
986993 ED->isScopedUsingClassTag () ? " class" : " struct" );
994+ if (const auto *Instance = ED->getTemplateInstantiationPattern ())
995+ JOS.attribute (" TemplateInstantiationPattern" ,
996+ createPointerRepresentation (Instance));
987997}
988998void JSONNodeDumper::VisitEnumConstantDecl (const EnumConstantDecl *ECD) {
989999 VisitNamedDecl (ECD);
@@ -1003,6 +1013,10 @@ void JSONNodeDumper::VisitCXXRecordDecl(const CXXRecordDecl *RD) {
10031013 JOS.attribute (" strict-pack-match" , true );
10041014 }
10051015
1016+ if (const auto *Instance = RD->getTemplateInstantiationPattern ())
1017+ JOS.attribute (" TemplateInstantiationPattern" ,
1018+ createPointerRepresentation (Instance));
1019+
10061020 // All other information requires a complete definition.
10071021 if (!RD->isCompleteDefinition ())
10081022 return ;
0 commit comments