return ExprError();
// Convert the number to the type that the parameter expects.
- ParmVarDecl *ParamDecl = Method->param_begin()[0];
+ ParmVarDecl *ParamDecl = Method->parameters()[0];
InitializedEntity Entity = InitializedEntity::InitializeParameter(Context,
ParamDecl);
ExprResult ConvertedNumber = PerformCopyInitialization(Entity,
}
// Convert the expression to the type that the parameter requires.
- ParmVarDecl *ParamDecl = BoxingMethod->param_begin()[0];
+ ParmVarDecl *ParamDecl = BoxingMethod->parameters()[0];
InitializedEntity Entity = InitializedEntity::InitializeParameter(Context,
ParamDecl);
ExprResult ConvertedValueExpr = PerformCopyInitialization(Entity,
return ExprError();
// Dig out the type that all elements should be converted to.
- QualType T = Method->param_begin()[0]->getType();
+ QualType T = Method->parameters()[0]->getType();
const PointerType *PtrT = T->getAs<PointerType>();
if (!PtrT ||
!Context.hasSameUnqualifiedType(PtrT->getPointeeType(), IdT)) {
Diag(SR.getBegin(), diag::err_objc_literal_method_sig)
<< Sel;
- Diag(Method->param_begin()[0]->getLocation(),
+ Diag(Method->parameters()[0]->getLocation(),
diag::note_objc_literal_method_param)
<< 0 << T
<< Context.getPointerType(IdT.withConst());
}
// Check that the 'count' parameter is integral.
- if (!Method->param_begin()[1]->getType()->isIntegerType()) {
+ if (!Method->parameters()[1]->getType()->isIntegerType()) {
Diag(SR.getBegin(), diag::err_objc_literal_method_sig)
<< Sel;
- Diag(Method->param_begin()[1]->getLocation(),
+ Diag(Method->parameters()[1]->getLocation(),
diag::note_objc_literal_method_param)
<< 1
- << Method->param_begin()[1]->getType()
+ << Method->parameters()[1]->getType()
<< "integral";
return ExprError();
}
ArrayWithObjectsMethod = Method;
}
- QualType ObjectsType = ArrayWithObjectsMethod->param_begin()[0]->getType();
+ QualType ObjectsType = ArrayWithObjectsMethod->parameters()[0]->getType();
QualType RequiredType = ObjectsType->castAs<PointerType>()->getPointeeType();
// Check that each of the elements provided is valid in a collection literal,
return ExprError();
// Dig out the type that all values should be converted to.
- QualType ValueT = Method->param_begin()[0]->getType();
+ QualType ValueT = Method->parameters()[0]->getType();
const PointerType *PtrValue = ValueT->getAs<PointerType>();
if (!PtrValue ||
!Context.hasSameUnqualifiedType(PtrValue->getPointeeType(), IdT)) {
Diag(SR.getBegin(), diag::err_objc_literal_method_sig)
<< Sel;
- Diag(Method->param_begin()[0]->getLocation(),
+ Diag(Method->parameters()[0]->getLocation(),
diag::note_objc_literal_method_param)
<< 0 << ValueT
<< Context.getPointerType(IdT.withConst());
}
// Dig out the type that all keys should be converted to.
- QualType KeyT = Method->param_begin()[1]->getType();
+ QualType KeyT = Method->parameters()[1]->getType();
const PointerType *PtrKey = KeyT->getAs<PointerType>();
if (!PtrKey ||
!Context.hasSameUnqualifiedType(PtrKey->getPointeeType(),
if (err) {
Diag(SR.getBegin(), diag::err_objc_literal_method_sig)
<< Sel;
- Diag(Method->param_begin()[1]->getLocation(),
+ Diag(Method->parameters()[1]->getLocation(),
diag::note_objc_literal_method_param)
<< 1 << KeyT
<< Context.getPointerType(IdT.withConst());
}
// Check that the 'count' parameter is integral.
- QualType CountType = Method->param_begin()[2]->getType();
+ QualType CountType = Method->parameters()[2]->getType();
if (!CountType->isIntegerType()) {
Diag(SR.getBegin(), diag::err_objc_literal_method_sig)
<< Sel;
- Diag(Method->param_begin()[2]->getLocation(),
+ Diag(Method->parameters()[2]->getLocation(),
diag::note_objc_literal_method_param)
<< 2 << CountType
<< "integral";
DictionaryWithObjectsMethod = Method;
}
- QualType ValuesT = DictionaryWithObjectsMethod->param_begin()[0]->getType();
+ QualType ValuesT = DictionaryWithObjectsMethod->parameters()[0]->getType();
QualType ValueT = ValuesT->castAs<PointerType>()->getPointeeType();
- QualType KeysT = DictionaryWithObjectsMethod->param_begin()[1]->getType();
+ QualType KeysT = DictionaryWithObjectsMethod->parameters()[1]->getType();
QualType KeyT = KeysT->castAs<PointerType>()->getPointeeType();
// Check that each of the keys and values provided is valid in a collection
Expr *argExpr = Args[i];
- ParmVarDecl *param = Method->param_begin()[i];
+ ParmVarDecl *param = Method->parameters()[i];
assert(argExpr && "CheckMessageArgumentTypes(): missing expression");
// Strip the unbridged-cast placeholder expression off unless it's
true /*instance*/);
if (!Getter)
return;
- QualType T = Getter->param_begin()[0]->getType();
+ QualType T = Getter->parameters()[0]->getType();
S.CheckObjCARCConversion(Key->getSourceRange(),
T, Key, Sema::CCK_ImplicitConversion);
}
}
if (AtIndexGetter) {
- QualType T = AtIndexGetter->param_begin()[0]->getType();
+ QualType T = AtIndexGetter->parameters()[0]->getType();
if ((arrayRef && !T->isIntegralOrEnumerationType()) ||
(!arrayRef && !T->isObjCObjectPointerType())) {
S.Diag(RefExpr->getKeyExpr()->getExprLoc(),
arrayRef ? diag::err_objc_subscript_index_type
: diag::err_objc_subscript_key_type) << T;
- S.Diag(AtIndexGetter->param_begin()[0]->getLocation(),
+ S.Diag(AtIndexGetter->parameters()[0]->getLocation(),
diag::note_parameter_type) << T;
return false;
}
bool err = false;
if (AtIndexSetter && arrayRef) {
- QualType T = AtIndexSetter->param_begin()[1]->getType();
+ QualType T = AtIndexSetter->parameters()[1]->getType();
if (!T->isIntegralOrEnumerationType()) {
S.Diag(RefExpr->getKeyExpr()->getExprLoc(),
diag::err_objc_subscript_index_type) << T;
- S.Diag(AtIndexSetter->param_begin()[1]->getLocation(),
+ S.Diag(AtIndexSetter->parameters()[1]->getLocation(),
diag::note_parameter_type) << T;
err = true;
}
- T = AtIndexSetter->param_begin()[0]->getType();
+ T = AtIndexSetter->parameters()[0]->getType();
if (!T->isObjCObjectPointerType()) {
S.Diag(RefExpr->getBaseExpr()->getExprLoc(),
diag::err_objc_subscript_object_type) << T << arrayRef;
- S.Diag(AtIndexSetter->param_begin()[0]->getLocation(),
+ S.Diag(AtIndexSetter->parameters()[0]->getLocation(),
diag::note_parameter_type) << T;
err = true;
}
}
else if (AtIndexSetter && !arrayRef)
for (unsigned i=0; i <2; i++) {
- QualType T = AtIndexSetter->param_begin()[i]->getType();
+ QualType T = AtIndexSetter->parameters()[i]->getType();
if (!T->isObjCObjectPointerType()) {
if (i == 1)
S.Diag(RefExpr->getKeyExpr()->getExprLoc(),
else
S.Diag(RefExpr->getBaseExpr()->getExprLoc(),
diag::err_objc_subscript_dic_object_type) << T;
- S.Diag(AtIndexSetter->param_begin()[i]->getLocation(),
+ S.Diag(AtIndexSetter->parameters()[i]->getLocation(),
diag::note_parameter_type) << T;
err = true;
}