diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp --- a/clang/lib/Serialization/ASTReaderDecl.cpp +++ b/clang/lib/Serialization/ASTReaderDecl.cpp @@ -4459,7 +4459,9 @@ if (auto *VTSD = dyn_cast(D)) { VTSD->setPointOfInstantiation(POI); } else if (auto *VD = dyn_cast(D)) { - VD->getMemberSpecializationInfo()->setPointOfInstantiation(POI); + MemberSpecializationInfo *MSInfo = VD->getMemberSpecializationInfo(); + assert(MSInfo && "No member specialization information"); + MSInfo->setPointOfInstantiation(POI); } else { auto *FD = cast(D); if (auto *FTSInfo = FD->TemplateOrSpecialization