================
@@ -1676,6 +1676,14 @@ TypeSystemClang::CreateClassTemplateSpecializationDecl(
class_template_specialization_decl->setInstantiationOf(class_template_decl);
class_template_specialization_decl->setTemplateArgs(
TemplateArgumentList::CreateCopy(ast, args));
+ void *InsertPos = nullptr;
+ if (!class_template_decl->findSpecialization(args, InsertPos)) {
+ // Add this specialization to the class template.
+ class_template_decl->AddSpecialization(class_template_specialization_decl,
+ InsertPos);
+ } else
+ // Specialization exists, so return nullptr.
+ return nullptr;
----------------
Michael137 wrote:
```suggestion
if (class_template_decl->findSpecialization(args, InsertPos))
return nullptr;
class_template_decl->AddSpecialization(class_template_specialization_decl,
InsertPos);
```
https://github.com/llvm/llvm-project/pull/154123
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits