aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2011-09-21 18:16:56 +0000
committerDavid Blaikie <dblaikie@gmail.com>2011-09-21 18:16:56 +0000
commit4278c654b645402554eb52a48e9c7097c9f1233a (patch)
tree2fd4b90833c21942cf4d7b4a39a26c425de9c3ef /lib/Sema
parent196e71e1357b14076c42f4a3458e6ea71714eb06 (diff)
ArrayRef-ifying Function/BlockDecl's setParams
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140268 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema')
-rw-r--r--lib/Sema/SemaDecl.cpp6
-rw-r--r--lib/Sema/SemaDeclAttr.cpp2
-rw-r--r--lib/Sema/SemaDeclCXX.cpp10
-rw-r--r--lib/Sema/SemaExpr.cpp2
-rw-r--r--lib/Sema/SemaExprCXX.cpp2
-rw-r--r--lib/Sema/SemaTemplateInstantiateDecl.cpp4
-rw-r--r--lib/Sema/TreeTransform.h2
7 files changed, 14 insertions, 14 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 164fb2f1c2..1057defc44 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -1290,7 +1290,7 @@ NamedDecl *Sema::LazilyCreateBuiltin(IdentifierInfo *II, unsigned bid,
parm->setScopeInfo(0, i);
Params.push_back(parm);
}
- New->setParams(Params.data(), Params.size());
+ New->setParams(Params);
}
AddKnownFunctionAttributes(New);
@@ -1853,7 +1853,7 @@ bool Sema::MergeFunctionDecl(FunctionDecl *New, Decl *OldD) {
Params.push_back(Param);
}
- New->setParams(Params.data(), Params.size());
+ New->setParams(Params);
}
return MergeCompatibleFunctionDecls(New, Old);
@@ -4873,7 +4873,7 @@ Sema::ActOnFunctionDeclarator(Scope *S, Declarator &D, DeclContext *DC,
"Should not need args for typedef of non-prototype fn");
}
// Finally, we know we have the right number of parameters, install them.
- NewFD->setParams(Params.data(), Params.size());
+ NewFD->setParams(Params);
// Process the non-inheritable attributes on this declaration.
ProcessDeclAttributes(S, NewFD, D,
diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp
index 1f97d40211..48f2f9675a 100644
--- a/lib/Sema/SemaDeclAttr.cpp
+++ b/lib/Sema/SemaDeclAttr.cpp
@@ -3674,7 +3674,7 @@ NamedDecl * Sema::DeclClonePragmaWeak(NamedDecl *ND, IdentifierInfo *II,
Param->setScopeInfo(0, Params.size());
Params.push_back(Param);
}
- NewFD->setParams(Params.data(), Params.size());
+ NewFD->setParams(Params);
}
} else if (VarDecl *VD = dyn_cast<VarDecl>(ND)) {
NewD = VarDecl::Create(VD->getASTContext(), VD->getDeclContext(),
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index 0d83d9fc5f..f9787e85c4 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -6835,7 +6835,7 @@ void Sema::DeclareInheritedConstructors(CXXRecordDecl *ClassDecl) {
/*TInfo=*/0, SC_None,
SC_None, /*DefaultArg=*/0));
}
- NewCtor->setParams(ParamDecls.data(), ParamDecls.size());
+ NewCtor->setParams(ParamDecls);
NewCtor->setInheritedConstructor(BaseCtor);
PushOnScopeChains(NewCtor, S, false);
@@ -7353,7 +7353,7 @@ CXXMethodDecl *Sema::DeclareImplicitCopyAssignment(CXXRecordDecl *ClassDecl) {
ArgType, /*TInfo=*/0,
SC_None,
SC_None, 0);
- CopyAssignment->setParams(&FromParam, 1);
+ CopyAssignment->setParams(FromParam);
// Note that we have added this copy-assignment operator.
++ASTContext::NumImplicitCopyAssignmentOperatorsDeclared;
@@ -7768,7 +7768,7 @@ CXXMethodDecl *Sema::DeclareImplicitMoveAssignment(CXXRecordDecl *ClassDecl) {
ArgType, /*TInfo=*/0,
SC_None,
SC_None, 0);
- MoveAssignment->setParams(&FromParam, 1);
+ MoveAssignment->setParams(FromParam);
// Note that we have added this copy-assignment operator.
++ASTContext::NumImplicitMoveAssignmentOperatorsDeclared;
@@ -8259,7 +8259,7 @@ CXXConstructorDecl *Sema::DeclareImplicitCopyConstructor(
ArgType, /*TInfo=*/0,
SC_None,
SC_None, 0);
- CopyConstructor->setParams(&FromParam, 1);
+ CopyConstructor->setParams(FromParam);
if (Scope *S = getScopeForContext(ClassDecl))
PushOnScopeChains(CopyConstructor, S, false);
@@ -8416,7 +8416,7 @@ CXXConstructorDecl *Sema::DeclareImplicitMoveConstructor(
ArgType, /*TInfo=*/0,
SC_None,
SC_None, 0);
- MoveConstructor->setParams(&FromParam, 1);
+ MoveConstructor->setParams(FromParam);
// C++0x [class.copy]p9:
// If the definition of a class X does not explicitly declare a move
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index cafed191f1..1d23f4f3b2 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -8710,7 +8710,7 @@ void Sema::ActOnBlockArguments(Declarator &ParamInfo, Scope *CurScope) {
// Set the parameters on the block decl.
if (!Params.empty()) {
- CurBlock->TheDecl->setParams(Params.data(), Params.size());
+ CurBlock->TheDecl->setParams(Params);
CheckParmsForFunctionDef(CurBlock->TheDecl->param_begin(),
CurBlock->TheDecl->param_end(),
/*CheckParameterNames=*/false);
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index 1741bdb1ef..140fd9003d 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -1671,7 +1671,7 @@ void Sema::DeclareGlobalAllocationFunction(DeclarationName Name,
SourceLocation(), 0,
Argument, /*TInfo=*/0,
SC_None, SC_None, 0);
- Alloc->setParams(&Param, 1);
+ Alloc->setParams(Param);
// FIXME: Also add this declaration to the IdentifierResolver, but
// make sure it is at the end of the chain to coincide with the
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp
index 43806c6364..4391e7a878 100644
--- a/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -1112,7 +1112,7 @@ Decl *TemplateDeclInstantiator::VisitFunctionDecl(FunctionDecl *D,
Params.push_back(Param);
}
}
- Function->setParams(Params.data(), Params.size());
+ Function->setParams(Params);
SourceLocation InstantiateAtPOI;
if (TemplateParams) {
@@ -1485,7 +1485,7 @@ TemplateDeclInstantiator::VisitCXXMethodDecl(CXXMethodDecl *D,
// Attach the parameters
for (unsigned P = 0; P < Params.size(); ++P)
Params[P]->setOwningFunction(Method);
- Method->setParams(Params.data(), Params.size());
+ Method->setParams(Params);
if (InitMethodInstantiation(Method, D))
Method->setInvalidDecl();
diff --git a/lib/Sema/TreeTransform.h b/lib/Sema/TreeTransform.h
index 12eba29799..32e8a0ec7e 100644
--- a/lib/Sema/TreeTransform.h
+++ b/lib/Sema/TreeTransform.h
@@ -7989,7 +7989,7 @@ TreeTransform<Derived>::TransformBlockExpr(BlockExpr *E) {
// Set the parameters on the block decl.
if (!params.empty())
- blockScope->TheDecl->setParams(params.data(), params.size());
+ blockScope->TheDecl->setParams(params);
// If the return type wasn't explicitly set, it will have been marked as a
// dependent type (DependentTy); clear out the return type setting so