[Lldb-commits] [lldb] [lldb][DWARFASTParserClang] Added a check for the specialization existence (PR #154123)
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Mon Sep 8 03:11:20 PDT 2025
================
@@ -1873,6 +1874,24 @@ DWARFASTParserClang::ParseStructureLikeDIE(const SymbolContext &sc,
clang_type =
m_ast.CreateClassTemplateSpecializationType(class_specialization_decl);
+ // Try to find an existing specialization with these template arguments and
+ // template parameter list.
+ void *InsertPos = nullptr;
+ llvm::ArrayRef<clang::TemplateArgument> args =
+ template_param_infos.GetArgs();
+ if (!args.empty() &&
+ !class_template_decl->findSpecialization(args, InsertPos))
+ // Add this specialization to the class template.
+ class_template_decl->AddSpecialization(class_specialization_decl,
+ InsertPos);
+ else {
+ module_sp->ReportError("SymbolFileDWARF({0:p}) - Specialization for "
----------------
Michael137 wrote:
I don't think we should be reporting this to the user console. Particularly, a user wouldn't really be aware of what a `Specialization for clang::ClassTemplateDecl` is and what the issue is with it already existing.
Lets just `LogConsole` here for now
https://github.com/llvm/llvm-project/pull/154123
More information about the lldb-commits
mailing list