summaryrefslogtreecommitdiffstats
path: root/clang/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
commiteff93e04018effd78ac738b1e2385a986accc8b0 (patch)
tree71146de25fc086d28015a2f216ba83f953f38bab /clang/lib/AST/DeclTemplate.cpp
parent409b794cfe49a269e3b6ac4c006cdba091b67c23 (diff)
downloadbcm5719-llvm-eff93e04018effd78ac738b1e2385a986accc8b0.tar.gz
bcm5719-llvm-eff93e04018effd78ac738b1e2385a986accc8b0.zip
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
Diffstat (limited to 'clang/lib/AST/DeclTemplate.cpp')
-rw-r--r--clang/lib/AST/DeclTemplate.cpp3
1 files changed, 2 insertions, 1 deletions
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);
}
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud