[cfe-commits] r102578 - /cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp
John McCall
rjmccall at apple.com
Wed Apr 28 18:18:58 PDT 2010
Author: rjmccall
Date: Wed Apr 28 20:18:58 2010
New Revision: 102578
URL: http://llvm.org/viewvc/llvm-project?rev=102578&view=rev
Log:
Access-check during template argument deduction from the context of the
template decl itself, not its context. Testcase to follow; fixes selfhost.
Modified:
cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp
Modified: cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp?rev=102578&r1=102577&r2=102578&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplateDeduction.cpp Wed Apr 28 20:18:58 2010
@@ -988,7 +988,7 @@
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 @@
if (Inst)
return TDK_InstantiationDepth;
- ContextRAII SavedContext(*this, FunctionTemplate->getDeclContext());
+ ContextRAII SavedContext(*this, FunctionTemplate->getTemplatedDecl());
if (CheckTemplateArgumentList(FunctionTemplate,
SourceLocation(),
@@ -1315,7 +1315,7 @@
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
More information about the cfe-commits
mailing list