From eff93e04018effd78ac738b1e2385a986accc8b0 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Thu, 5 Feb 2009 23:33:38 +0000 Subject: Improve the representation of template type parameters. We now canonicalize by template parameter depth, index, and name, and the unnamed version of a template parameter serves as the canonical. TemplateTypeParmDecl no longer needs to inherit from TemplateParmPosition, since depth and index information is present within the type. llvm-svn: 63899 --- clang/lib/AST/DeclTemplate.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/AST/DeclTemplate.cpp') diff --git a/clang/lib/AST/DeclTemplate.cpp b/clang/lib/AST/DeclTemplate.cpp index 08cd5b377d2..394939569ea 100644 --- a/clang/lib/AST/DeclTemplate.cpp +++ b/clang/lib/AST/DeclTemplate.cpp @@ -78,7 +78,8 @@ TemplateTypeParmDecl * TemplateTypeParmDecl::Create(ASTContext &C, DeclContext *DC, SourceLocation L, unsigned D, unsigned P, IdentifierInfo *Id, bool Typename) { - return new (C) TemplateTypeParmDecl(DC, L, D, P, Id, Typename); + QualType Type = C.getTemplateTypeParmType(D, P, Id); + return new (C) TemplateTypeParmDecl(DC, L, Id, Typename, Type); } //===----------------------------------------------------------------------===// -- cgit v1.2.3