[clang] [clang] Don't lose track of explicit specializations of member functi… (PR #111267)

Matheus Izvekov via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 5 19:31:57 PDT 2024


================
@@ -4206,18 +4206,14 @@ Sema::InstantiateClassMembers(SourceLocation PointOfInstantiation,
         if (Function->hasAttr<ExcludeFromExplicitInstantiationAttr>())
           continue;
 
-        MemberSpecializationInfo *MSInfo =
-            Function->getMemberSpecializationInfo();
-        assert(MSInfo && "No member specialization information?");
-        if (MSInfo->getTemplateSpecializationKind()
-                                                 == TSK_ExplicitSpecialization)
+        TemplateSpecializationKind PrevTSK =
+            Function->getTemplateSpecializationKind();
+        if (PrevTSK == TSK_ExplicitSpecialization)
           continue;
----------------
mizvekov wrote:

I don't think that would matter, unless the assert above was wrong, as the `DependentFunctionTemplateSpecializationInfo` case is handled in the fallback path, when `MSInfo` is null.

https://github.com/llvm/llvm-project/pull/111267


More information about the cfe-commits mailing list