Author: Adrian Prantl Date: 2024-05-07T13:03:14-07:00 New Revision: 2e4abfae57f81e2bb23fc654d6edbaeae51ae10a
URL: https://github.com/llvm/llvm-project/commit/2e4abfae57f81e2bb23fc654d6edbaeae51ae10a DIFF: https://github.com/llvm/llvm-project/commit/2e4abfae57f81e2bb23fc654d6edbaeae51ae10a.diff LOG: Revert "[Sema] Fix warnings" This reverts commit 65e2fab401a2da55c51d3caceae8478c33f3c60f because I'm also reverting 7115ed0fff027b65fa76fdfae215ed1382ed1473. Added: Modified: clang/lib/Sema/SemaTemplate.cpp clang/lib/Sema/SemaTemplateInstantiateDecl.cpp Removed: ################################################################################ diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp index 6231b65bd842a..b268d7c405dfd 100644 --- a/clang/lib/Sema/SemaTemplate.cpp +++ b/clang/lib/Sema/SemaTemplate.cpp @@ -9276,6 +9276,8 @@ DeclResult Sema::ActOnClassTemplateSpecialization( // NOTE: KWLoc is the location of the tag keyword. This will instead // store the location of the outermost template keyword in the declaration. + SourceLocation TemplateKWLoc = TemplateParameterLists.size() > 0 + ? TemplateParameterLists[0]->getTemplateLoc() : KWLoc; SourceLocation TemplateNameLoc = TemplateId.TemplateNameLoc; SourceLocation LAngleLoc = TemplateId.LAngleLoc; SourceLocation RAngleLoc = TemplateId.RAngleLoc; diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp index 884e98a300f5a..5315b143215e1 100644 --- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -3932,6 +3932,12 @@ TemplateDeclInstantiator::VisitClassTemplateSpecializationDecl( if (SubstQualifier(D, InstD)) return nullptr; + // Build the canonical type that describes the converted template + // arguments of the class template explicit specialization. + QualType CanonType = SemaRef.Context.getTemplateSpecializationType( + TemplateName(InstClassTemplate), CanonicalConverted, + SemaRef.Context.getRecordType(InstD)); + InstD->setAccess(D->getAccess()); InstD->setInstantiationOfMemberClass(D, TSK_ImplicitInstantiation); InstD->setSpecializationKind(D->getSpecializationKind()); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits