summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-06-15 14:20:42 +0000
committerDouglas Gregor <dgregor@apple.com>2011-06-15 14:20:42 +0000
commit55462626b612128049c91ee2ada992a351052ded (patch)
treee8034b94a0f4564fbb9b2a087ef1b96472c88ba0 /clang/lib/Sema/SemaTemplate.cpp
parent24c65588653b6cf6d14555bc1b15f17f88f29ac0 (diff)
downloadbcm5719-llvm-55462626b612128049c91ee2ada992a351052ded.tar.gz
bcm5719-llvm-55462626b612128049c91ee2ada992a351052ded.zip
When performing substitution of default template template parameters
before the template parameters have acquired a proper context (e.g., because the enclosing context has yet to be built), provide empty parameter lists for all outer template parameter scopes to inhibit any substitution for those template parameters. Fixes PR9643 / <rdar://problem/9251019>. llvm-svn: 133055
Diffstat (limited to 'clang/lib/Sema/SemaTemplate.cpp')
-rw-r--r--clang/lib/Sema/SemaTemplate.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp
index 5d4caacd812..d458050585f 100644
--- a/clang/lib/Sema/SemaTemplate.cpp
+++ b/clang/lib/Sema/SemaTemplate.cpp
@@ -2912,16 +2912,6 @@ bool Sema::CheckTemplateArgumentList(TemplateDecl *Template,
// arguments, just break out now and we'll fill in the argument pack below.
if ((*Param)->isTemplateParameterPack())
break;
-
- // If our template is a template template parameter that hasn't acquired
- // its proper context yet (e.g., because we're using the template template
- // parameter in the signature of a function template, before we've built
- // the function template itself), don't attempt substitution of default
- // template arguments at this point: we don't have enough context to
- // do it properly.
- if (isTemplateTemplateParameter &&
- Template->getDeclContext()->isTranslationUnit())
- break;
// We have a default template argument that we will use.
TemplateArgumentLoc Arg;
OpenPOWER on IntegriCloud