aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplateInstantiateDecl.cpp
diff options
context:
space:
mode:
authorAbramo Bagnara <abramo.bagnara@gmail.com>2010-06-16 14:59:30 +0000
committerAbramo Bagnara <abramo.bagnara@gmail.com>2010-06-16 14:59:30 +0000
commit6cd8087e66d706f2317865f86c865fd9bc6969c9 (patch)
treede1781c31ba2111c10c422dfe55ecad08886c42d /lib/Sema/SemaTemplateInstantiateDecl.cpp
parent50163009b13386d21c80e38759db2b4818cde7b0 (diff)
Added TemplateTypeParmType::getDecl().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106099 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r--lib/Sema/SemaTemplateInstantiateDecl.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp
index b7059e5752..a582b557c8 100644
--- a/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -1442,14 +1442,12 @@ ParmVarDecl *TemplateDeclInstantiator::VisitParmVarDecl(ParmVarDecl *D) {
Decl *TemplateDeclInstantiator::VisitTemplateTypeParmDecl(
TemplateTypeParmDecl *D) {
// TODO: don't always clone when decls are refcounted.
- const Type* T = D->getTypeForDecl();
- assert(T->isTemplateTypeParmType());
- const TemplateTypeParmType *TTPT = T->getAs<TemplateTypeParmType>();
+ assert(D->getTypeForDecl()->isTemplateTypeParmType());
TemplateTypeParmDecl *Inst =
TemplateTypeParmDecl::Create(SemaRef.Context, Owner, D->getLocation(),
- TTPT->getDepth() - 1, TTPT->getIndex(),
- TTPT->getName(),
+ D->getDepth() - 1, D->getIndex(),
+ D->getIdentifier(),
D->wasDeclaredWithTypename(),
D->isParameterPack());