aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/DeclTemplate.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-02-05 23:33:38 +0000
committerDouglas Gregor <dgregor@apple.com>2009-02-05 23:33:38 +0000
commitfab9d67cebb87be968e7ae31a3b549a5279b5d51 (patch)
treee6e71ce878f610e0f9539097db19e55df64e566e /lib/AST/DeclTemplate.cpp
parent4a3aed942bd6e4e73679b1676bc1ac82248b592d (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63899 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclTemplate.cpp')
-rw-r--r--lib/AST/DeclTemplate.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/AST/DeclTemplate.cpp b/lib/AST/DeclTemplate.cpp
index 08cd5b377d..394939569e 100644
--- a/lib/AST/DeclTemplate.cpp
+++ b/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);
}
//===----------------------------------------------------------------------===//