Skip to content

Commit 65e2fab

Browse files
[Sema] Fix warnings
This patch fixes: clang/lib/Sema/SemaTemplateInstantiateDecl.cpp:3937:12: error: unused variable 'CanonType' [-Werror,-Wunused-variable] clang/lib/Sema/SemaTemplate.cpp:9279:18: error: unused variable 'TemplateKWLoc' [-Werror,-Wunused-variable]
1 parent 057de4d commit 65e2fab

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

clang/lib/Sema/SemaTemplate.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9276,8 +9276,6 @@ 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;
92819279
SourceLocation TemplateNameLoc = TemplateId.TemplateNameLoc;
92829280
SourceLocation LAngleLoc = TemplateId.LAngleLoc;
92839281
SourceLocation RAngleLoc = TemplateId.RAngleLoc;

clang/lib/Sema/SemaTemplateInstantiateDecl.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3932,12 +3932,6 @@ 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-
39413935
InstD->setAccess(D->getAccess());
39423936
InstD->setInstantiationOfMemberClass(D, TSK_ImplicitInstantiation);
39433937
InstD->setSpecializationKind(D->getSpecializationKind());

0 commit comments

Comments
 (0)