diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-05-11 23:53:27 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-05-11 23:53:27 +0000 |
commit | 7e06390f8a60440d6fc5f0e633acdc2edd8ee924 (patch) | |
tree | 6a88de5335e85643eb98167d1f6260ff851a976c /lib/Sema/SemaTemplate.cpp | |
parent | 3ef538dd1bb1001fa1a1d50594d13f480a8dfa21 (diff) |
Encapsulate template arguments lists in a new class,
TemplateArgumentList. This avoids the need to pass around
pointer/length pairs of template arguments lists, and will eventually
make it easier to introduce member templates and variadic templates.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71517 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r-- | lib/Sema/SemaTemplate.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index 3938978dfd..fc44217252 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/lib/Sema/SemaTemplate.cpp @@ -993,7 +993,11 @@ bool Sema::CheckTemplateArgumentList(TemplateDecl *Template, Template, &Converted[0], Converted.size(), SourceRange(TemplateLoc, RAngleLoc)); - ArgType = InstantiateType(ArgType, &Converted[0], Converted.size(), + + TemplateArgumentList TemplateArgs(Context, &Converted[0], + Converted.size(), + /*CopyArgs=*/false); + ArgType = InstantiateType(ArgType, TemplateArgs, TTP->getDefaultArgumentLoc(), TTP->getDeclName()); } @@ -1061,8 +1065,10 @@ bool Sema::CheckTemplateArgumentList(TemplateDecl *Template, Converted.size(), SourceRange(TemplateLoc, RAngleLoc)); - NTTPType = InstantiateType(NTTPType, - &Converted[0], Converted.size(), + TemplateArgumentList TemplateArgs(Context, &Converted[0], + Converted.size(), + /*CopyArgs=*/false); + NTTPType = InstantiateType(NTTPType, TemplateArgs, NTTP->getLocation(), NTTP->getDeclName()); // If that worked, check the non-type template parameter type |