[cfe-commits] r100865 - in /cfe/trunk: include/clang/AST/DeclObjC.h lib/AST/ASTImporter.cpp lib/Frontend/PCHReaderDecl.cpp lib/Sema/SemaDeclObjC.cpp lib/Sema/SemaObjCProperty.cpp
Fariborz Jahanian
fjahanian at apple.com
Fri Apr 9 08:40:42 PDT 2010
Author: fjahanian
Date: Fri Apr 9 10:40:42 2010
New Revision: 100865
URL: http://llvm.org/viewvc/llvm-project?rev=100865&view=rev
Log:
Fixes a regression caused by implementing cstyle methods
for objc.
Modified:
cfe/trunk/include/clang/AST/DeclObjC.h
cfe/trunk/lib/AST/ASTImporter.cpp
cfe/trunk/lib/Frontend/PCHReaderDecl.cpp
cfe/trunk/lib/Sema/SemaDeclObjC.cpp
cfe/trunk/lib/Sema/SemaObjCProperty.cpp
Modified: cfe/trunk/include/clang/AST/DeclObjC.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclObjC.h?rev=100865&r1=100864&r2=100865&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclObjC.h (original)
+++ cfe/trunk/include/clang/AST/DeclObjC.h Fri Apr 9 10:40:42 2010
@@ -252,8 +252,10 @@
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.
Modified: cfe/trunk/lib/AST/ASTImporter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTImporter.cpp?rev=100865&r1=100864&r2=100865&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTImporter.cpp (original)
+++ cfe/trunk/lib/AST/ASTImporter.cpp Fri Apr 9 10:40:42 2010
@@ -2312,7 +2312,8 @@
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);
Modified: cfe/trunk/lib/Frontend/PCHReaderDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHReaderDecl.cpp?rev=100865&r1=100864&r2=100865&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/PCHReaderDecl.cpp (original)
+++ cfe/trunk/lib/Frontend/PCHReaderDecl.cpp Fri Apr 9 10:40:42 2010
@@ -221,7 +221,8 @@
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) {
Modified: cfe/trunk/lib/Sema/SemaDeclObjC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclObjC.cpp?rev=100865&r1=100864&r2=100865&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclObjC.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclObjC.cpp Fri Apr 9 10:40:42 2010
@@ -1587,8 +1587,8 @@
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;
Modified: cfe/trunk/lib/Sema/SemaObjCProperty.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaObjCProperty.cpp?rev=100865&r1=100864&r2=100865&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaObjCProperty.cpp (original)
+++ cfe/trunk/lib/Sema/SemaObjCProperty.cpp Fri Apr 9 10:40:42 2010
@@ -954,7 +954,7 @@
/*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
More information about the cfe-commits
mailing list