aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-08-28 20:31:08 +0000
committerDouglas Gregor <dgregor@apple.com>2009-08-28 20:31:08 +0000
commitd6350aefb1396b299e199c7f1fe51bb40c12e75e (patch)
tree6d1d252f7d22def4ad36e95c9a2453cd3e44a1ac /lib/Sema/SemaTemplate.cpp
parentc761f40467a76c5bba819324ddc489c214c5a5da (diff)
Implement template instantiation for member class templates.
When performing template instantiation of the definitions of member templates (or members thereof), we build a data structure containing the template arguments from each "level" of template instantiation. During template instantiation, we substitute all levels of template arguments simultaneously. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80389 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r--lib/Sema/SemaTemplate.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp
index e0798f685b..4fa09d8fda 100644
--- a/lib/Sema/SemaTemplate.cpp
+++ b/lib/Sema/SemaTemplate.cpp
@@ -1243,7 +1243,8 @@ bool Sema::CheckTemplateArgumentList(TemplateDecl *Template,
TemplateArgumentList TemplateArgs(Context, Converted,
/*TakeArgs=*/false);
- ArgType = SubstType(ArgType, TemplateArgs,
+ ArgType = SubstType(ArgType,
+ MultiLevelTemplateArgumentList(TemplateArgs),
TTP->getDefaultArgumentLoc(),
TTP->getDeclName());
}
@@ -1265,8 +1266,9 @@ bool Sema::CheckTemplateArgumentList(TemplateDecl *Template,
TemplateArgumentList TemplateArgs(Context, Converted,
/*TakeArgs=*/false);
- Sema::OwningExprResult E = SubstExpr(NTTP->getDefaultArgument(),
- TemplateArgs);
+ Sema::OwningExprResult E
+ = SubstExpr(NTTP->getDefaultArgument(),
+ MultiLevelTemplateArgumentList(TemplateArgs));
if (E.isInvalid())
return true;