Fixes a regression caused by implementing cstyle methods

for objc.

llvm-svn: 100865
This commit is contained in:
Fariborz Jahanian 2010-04-09 15:40:42 +00:00
parent 524b4606f7
commit cdabb31d6f
5 changed files with 10 additions and 6 deletions

View File

@ -252,8 +252,10 @@ public:
return ParamInfo.begin() + NumSelectorArgs;
}
void setMethodParams(ASTContext &C, ParmVarDecl *const *List, unsigned Num) {
void setMethodParams(ASTContext &C, ParmVarDecl *const *List, unsigned Num,
unsigned numSelectorArgs) {
ParamInfo.set(List, Num, C);
NumSelectorArgs = numSelectorArgs;
}
// Iterator access to parameter types.

View File

@ -2312,7 +2312,8 @@ Decl *ASTNodeImporter::VisitObjCMethodDecl(ObjCMethodDecl *D) {
ToMethod->addDecl(ToParams[I]);
}
ToMethod->setMethodParams(Importer.getToContext(),
ToParams.data(), ToParams.size());
ToParams.data(), ToParams.size(),
ToParams.size());
ToMethod->setLexicalDeclContext(LexicalDC);
Importer.Imported(D, ToMethod);

View File

@ -221,7 +221,8 @@ void PCHDeclReader::VisitObjCMethodDecl(ObjCMethodDecl *MD) {
Params.reserve(NumParams);
for (unsigned I = 0; I != NumParams; ++I)
Params.push_back(cast<ParmVarDecl>(Reader.GetDecl(Record[Idx++])));
MD->setMethodParams(*Reader.getContext(), Params.data(), NumParams);
MD->setMethodParams(*Reader.getContext(), Params.data(), NumParams,
NumParams);
}
void PCHDeclReader::VisitObjCContainerDecl(ObjCContainerDecl *CD) {

View File

@ -1587,8 +1587,8 @@ Sema::DeclPtrTy Sema::ActOnMethodDeclaration(
Params.push_back(Param);
}
ObjCMethod->setMethodParams(Context, Params.data(), Params.size());
ObjCMethod->setNumSelectorArgs(Sel.getNumArgs());
ObjCMethod->setMethodParams(Context, Params.data(), Params.size(),
Sel.getNumArgs());
ObjCMethod->setObjCDeclQualifier(
CvtQTToAstBitMask(ReturnQT.getObjCDeclQualifier()));
const ObjCMethodDecl *PrevMethod = 0;

View File

@ -954,7 +954,7 @@ void Sema::ProcessPropertyDecl(ObjCPropertyDecl *property,
/*TInfo=*/0,
VarDecl::None,
0);
SetterMethod->setMethodParams(Context, &Argument, 1);
SetterMethod->setMethodParams(Context, &Argument, 1, 1);
CD->addDecl(SetterMethod);
} else
// A user declared setter will be synthesize when @synthesize of