Skip to content

Commit 2e4abfa

Browse files
committed
Revert "[Sema] Fix warnings"
This reverts commit 65e2fab because I'm also reverting 7115ed0.
1 parent dca3a6e commit 2e4abfa

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

clang/lib/Sema/SemaTemplate.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9276,6 +9276,8 @@ DeclResult Sema::ActOnClassTemplateSpecialization(
92769276

92779277
// NOTE: KWLoc is the location of the tag keyword. This will instead
92789278
// store the location of the outermost template keyword in the declaration.
9279+
SourceLocation TemplateKWLoc = TemplateParameterLists.size() > 0
9280+
? TemplateParameterLists[0]->getTemplateLoc() : KWLoc;
92799281
SourceLocation TemplateNameLoc = TemplateId.TemplateNameLoc;
92809282
SourceLocation LAngleLoc = TemplateId.LAngleLoc;
92819283
SourceLocation RAngleLoc = TemplateId.RAngleLoc;

clang/lib/Sema/SemaTemplateInstantiateDecl.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3932,6 +3932,12 @@ TemplateDeclInstantiator::VisitClassTemplateSpecializationDecl(
39323932
if (SubstQualifier(D, InstD))
39333933
return nullptr;
39343934

3935+
// Build the canonical type that describes the converted template
3936+
// arguments of the class template explicit specialization.
3937+
QualType CanonType = SemaRef.Context.getTemplateSpecializationType(
3938+
TemplateName(InstClassTemplate), CanonicalConverted,
3939+
SemaRef.Context.getRecordType(InstD));
3940+
39353941
InstD->setAccess(D->getAccess());
39363942
InstD->setInstantiationOfMemberClass(D, TSK_ImplicitInstantiation);
39373943
InstD->setSpecializationKind(D->getSpecializationKind());

0 commit comments

Comments
 (0)