aboutsummaryrefslogtreecommitdiff
path: root/clang
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2024-05-07 13:02:04 -0700
committerAdrian Prantl <aprantl@apple.com>2024-05-07 13:03:14 -0700
commit2e4abfae57f81e2bb23fc654d6edbaeae51ae10a (patch)
tree93e87dee8371258e3074ade485af1c86087989ae /clang
parentdca3a6e562e012940c2b62a4d8dae3afec09caa4 (diff)
downloadllvm-2e4abfae57f81e2bb23fc654d6edbaeae51ae10a.zip
llvm-2e4abfae57f81e2bb23fc654d6edbaeae51ae10a.tar.gz
llvm-2e4abfae57f81e2bb23fc654d6edbaeae51ae10a.tar.bz2
Revert "[Sema] Fix warnings"
This reverts commit 65e2fab401a2da55c51d3caceae8478c33f3c60f because I'm also reverting 7115ed0fff027b65fa76fdfae215ed1382ed1473.
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/Sema/SemaTemplate.cpp2
-rw-r--r--clang/lib/Sema/SemaTemplateInstantiateDecl.cpp6
2 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp
index 6231b65..b268d7c 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 884e98a..5315b14 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());