diff options
author | John McCall <rjmccall@apple.com> | 2011-06-30 08:33:18 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-06-30 08:33:18 +0000 |
commit | 146060435c3efce95c95a092c7a1eb651cfb9ae0 (patch) | |
tree | 8ee5c7bb0befa2fd813058ce94098c2ad9f6ffec /lib/Sema/SemaTemplateInstantiate.cpp | |
parent | a8581b9ca06e6ad504af2e28c0798520364f7f1b (diff) |
Preserve that a TemplateName was arrived at by substituting
for a template template parameter.
Uses to follow.
I've also made the uniquing of SubstTemplateTemplateParmPacks
use a ContextualFoldingSet as a minor space efficiency.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134137 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiate.cpp')
-rw-r--r-- | lib/Sema/SemaTemplateInstantiate.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Sema/SemaTemplateInstantiate.cpp b/lib/Sema/SemaTemplateInstantiate.cpp index 69e592ee25..c452e26a40 100644 --- a/lib/Sema/SemaTemplateInstantiate.cpp +++ b/lib/Sema/SemaTemplateInstantiate.cpp @@ -992,13 +992,14 @@ TemplateName TemplateInstantiator::TransformTemplateName(CXXScopeSpec &SS, TemplateName Template = Arg.getAsTemplate(); assert(!Template.isNull() && "Null template template argument"); - + // We don't ever want to substitute for a qualified template name, since // the qualifier is handled separately. So, look through the qualified // template name to its underlying declaration. if (QualifiedTemplateName *QTN = Template.getAsQualifiedTemplateName()) Template = TemplateName(QTN->getTemplateDecl()); - + + Template = getSema().Context.getSubstTemplateTemplateParm(TTP, Template); return Template; } } |