================
@@ -4433,8 +4433,12 @@ Sema::InstantiateClassMembers(SourceLocation 
PointOfInstantiation,
       // No need to instantiate in-class initializers during explicit
       // instantiation.
       if (Field->hasInClassInitializer() && TSK == TSK_ImplicitInstantiation) {
+        // Handle local classes which could have substituted template params.
         CXXRecordDecl *ClassPattern =
-            Instantiation->getTemplateInstantiationPattern();
+            Instantiation->isLocalClass()
+                ? Instantiation->getInstantiatedFromMemberClass()
+                : Instantiation->getTemplateInstantiationPattern();
----------------
mizvekov wrote:

Yes, the pattern is the corpus of the template, the parts which needs to be 
have template parameters replaced in order to produce an instantiation.

I think what I said still stands.

https://github.com/llvm/llvm-project/pull/121225
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to