[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 05:00:45 PDT 2025
    
    
  
================
@@ -1873,6 +1873,18 @@ DWARFASTParserClang::ParseStructureLikeDIE(const SymbolContext &sc,
     clang_type =
         m_ast.CreateClassTemplateSpecializationType(class_specialization_decl);
 
+    if (!class_specialization_decl) {
+      if (log) {
+        dwarf->GetObjectFile()->GetModule()->LogMessage(
+            log,
+            "SymbolFileDWARF({0:p}) - Specialization for "
+            "clang::ClassTemplateDecl({1:p}) already exists.",
+            static_cast<void *>(this),
+            static_cast<void *>(class_template_decl));
----------------
Michael137 wrote:
I *think* the casts are not needed:
```suggestion
            "SymbolFileDWARF({0:p}) - Specialization for "
            "clang::ClassTemplateDecl({1}, {2:p}) already exists.",
            this, llvm::StringRef(attrs.name), class_template_decl);
```
https://github.com/llvm/llvm-project/pull/154123
    
    
More information about the lldb-commits
mailing list