aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplateDeduction.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-04-29 01:18:58 +0000
committerJohn McCall <rjmccall@apple.com>2010-04-29 01:18:58 +0000
commit96db310ab7ca59e1890ddef25a3701bc2909d20f (patch)
tree3714d0c2a138d0782b87f3ef6943483ba8e8573d /lib/Sema/SemaTemplateDeduction.cpp
parent862b24f8e9b1a3b332399591e48b303f57f01d0a (diff)
Access-check during template argument deduction from the context of the
template decl itself, not its context. Testcase to follow; fixes selfhost. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102578 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateDeduction.cpp')
-rw-r--r--lib/Sema/SemaTemplateDeduction.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaTemplateDeduction.cpp b/lib/Sema/SemaTemplateDeduction.cpp
index 13bfc0fdf9..e7a12d6b70 100644
--- a/lib/Sema/SemaTemplateDeduction.cpp
+++ b/lib/Sema/SemaTemplateDeduction.cpp
@@ -988,7 +988,7 @@ Sema::DeduceTemplateArguments(ClassTemplatePartialSpecializationDecl *Partial,
if (Inst)
return TDK_InstantiationDepth;
- ContextRAII SavedContext(*this, Partial->getDeclContext());
+ ContextRAII SavedContext(*this, Partial);
// C++ [temp.deduct.type]p2:
// [...] or if any template argument remains neither deduced nor
@@ -1165,7 +1165,7 @@ Sema::SubstituteExplicitTemplateArguments(
if (Inst)
return TDK_InstantiationDepth;
- ContextRAII SavedContext(*this, FunctionTemplate->getDeclContext());
+ ContextRAII SavedContext(*this, FunctionTemplate->getTemplatedDecl());
if (CheckTemplateArgumentList(FunctionTemplate,
SourceLocation(),
@@ -1315,7 +1315,7 @@ Sema::FinishTemplateArgumentDeduction(FunctionTemplateDecl *FunctionTemplate,
if (Inst)
return TDK_InstantiationDepth;
- ContextRAII SavedContext(*this, FunctionTemplate->getDeclContext());
+ ContextRAII SavedContext(*this, FunctionTemplate->getTemplatedDecl());
// C++ [temp.deduct.type]p2:
// [...] or if any template argument remains neither deduced nor