forked from OSchip/llvm-project
Fixes a regression caused by implementing cstyle methods
for objc. llvm-svn: 100865
This commit is contained in:
parent
524b4606f7
commit
cdabb31d6f
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue