@@ -747,9 +747,7 @@ DWARFASTParserClang::GetDIEClassTemplateParams(const DWARFDIE &die) {
747747
748748 clang::DeclContext *decl_ctx = GetClangDeclContextContainingDIE (die, nullptr );
749749 TypeSystemClang::TemplateParameterInfos template_param_infos;
750- if (ParseTemplateParameterInfos (die, template_param_infos) &&
751- (!template_param_infos.args .empty () ||
752- template_param_infos.packed_args )) {
750+ if (ParseTemplateParameterInfos (die, template_param_infos)) {
753751 // Most of the parameters here don't matter, but we make sure the base name
754752 // is empty so when we print the name we only get the template parameters.
755753 clang::ClassTemplateDecl *class_template_decl =
@@ -1787,9 +1785,7 @@ DWARFASTParserClang::ParseStructureLikeDIE(const SymbolContext &sc,
17871785 metadata.SetIsDynamicCXXType (dwarf->ClassOrStructIsVirtual (die));
17881786
17891787 TypeSystemClang::TemplateParameterInfos template_param_infos;
1790- if (ParseTemplateParameterInfos (die, template_param_infos) &&
1791- (!template_param_infos.args .empty () ||
1792- template_param_infos.packed_args )) {
1788+ if (ParseTemplateParameterInfos (die, template_param_infos)) {
17931789 clang::ClassTemplateDecl *class_template_decl =
17941790 m_ast.ParseClassTemplateDecl (
17951791 decl_ctx, GetOwningClangModule (die), attrs.accessibility ,
@@ -2123,7 +2119,10 @@ bool DWARFASTParserClang::ParseTemplateParameterInfos(
21232119 break ;
21242120 }
21252121 }
2126- return template_param_infos.args .size () == template_param_infos.names .size ();
2122+ return template_param_infos.args .size () ==
2123+ template_param_infos.names .size () &&
2124+ (!template_param_infos.args .empty () ||
2125+ template_param_infos.packed_args );
21272126}
21282127
21292128bool DWARFASTParserClang::CompleteRecordType (const DWARFDIE &die,
0 commit comments