aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplateDeduction.cpp
diff options
context:
space:
mode:
authorAhmed Charles <ace2001ac@gmail.com>2012-02-25 11:00:22 +0000
committerAhmed Charles <ace2001ac@gmail.com>2012-02-25 11:00:22 +0000
commit13a140caba448a66ffcc5ff0d32a87d6e4f4ad3f (patch)
tree4c9eabc3b789a4864cc8c84242255694e597e17a /lib/Sema/SemaTemplateDeduction.cpp
parent5297d71e8c85f9b04dc31c690e91c6a2f7eddb90 (diff)
ArrayRef'ize various functions in the AST/Parser/Sema.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151447 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateDeduction.cpp')
-rw-r--r--lib/Sema/SemaTemplateDeduction.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Sema/SemaTemplateDeduction.cpp b/lib/Sema/SemaTemplateDeduction.cpp
index d6cfc1aac7..f3de38f628 100644
--- a/lib/Sema/SemaTemplateDeduction.cpp
+++ b/lib/Sema/SemaTemplateDeduction.cpp
@@ -2909,7 +2909,7 @@ static bool hasDeducibleTemplateParameters(Sema &S,
Sema::TemplateDeductionResult
Sema::DeduceTemplateArguments(FunctionTemplateDecl *FunctionTemplate,
TemplateArgumentListInfo *ExplicitTemplateArgs,
- Expr **Args, unsigned NumArgs,
+ llvm::ArrayRef<Expr *> Args,
FunctionDecl *&Specialization,
TemplateDeductionInfo &Info) {
FunctionDecl *Function = FunctionTemplate->getTemplatedDecl();
@@ -2918,10 +2918,10 @@ Sema::DeduceTemplateArguments(FunctionTemplateDecl *FunctionTemplate,
// Template argument deduction is done by comparing each function template
// parameter type (call it P) with the type of the corresponding argument
// of the call (call it A) as described below.
- unsigned CheckArgs = NumArgs;
- if (NumArgs < Function->getMinRequiredArguments())
+ unsigned CheckArgs = Args.size();
+ if (Args.size() < Function->getMinRequiredArguments())
return TDK_TooFewArguments;
- else if (NumArgs > Function->getNumParams()) {
+ else if (Args.size() > Function->getNumParams()) {
const FunctionProtoType *Proto
= Function->getType()->getAs<FunctionProtoType>();
if (Proto->isTemplateVariadic())
@@ -3062,7 +3062,7 @@ Sema::DeduceTemplateArguments(FunctionTemplateDecl *FunctionTemplate,
PrepareArgumentPackDeduction(*this, Deduced, PackIndices, SavedPacks,
NewlyDeducedPacks);
bool HasAnyArguments = false;
- for (; ArgIdx < NumArgs; ++ArgIdx) {
+ for (; ArgIdx < Args.size(); ++ArgIdx) {
HasAnyArguments = true;
QualType OrigParamType = ParamPattern;