================ @@ -2534,11 +2534,21 @@ Decl *TemplateDeclInstantiator::VisitVarTemplatePartialSpecializationDecl( VarTemplateDecl *VarTemplate = D->getSpecializedTemplate(); // Lookup the already-instantiated declaration and return that. + // + // The primary member variable template is normally instantiated into Owner + // before its partial specializations, because it is declared first. That may + // not hold when the enclosing class template is deserialized from a PCH or + // module built with errors, so instantiate the primary on demand here. ---------------- ChuanqiXu9 wrote:
If the deserialization has errors, we should fix that. https://github.com/llvm/llvm-project/pull/202958 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
