forked from OSchip/llvm-project
Rename several ObjC action methods to use the "ActOn" prefix (still a few more to do).
Remove Action::ObjCStartCategoryInterface/ObjCFinishInterface - they are unused. . llvm-svn: 42559
This commit is contained in:
parent
b75640c9f1
commit
0c37b0cb5a
|
@ -93,10 +93,10 @@ MinimalAction::ObjcStartProtoInterface(Scope* S,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/// ObjcClassDeclaration -
|
||||
/// ActOnForwardClassDeclaration -
|
||||
/// Scope will always be top level file scope.
|
||||
Action::DeclTy *
|
||||
MinimalAction::ObjcClassDeclaration(Scope *S, SourceLocation AtClassLoc,
|
||||
MinimalAction::ActOnForwardClassDeclaration(Scope *S, SourceLocation AtClassLoc,
|
||||
IdentifierInfo **IdentList, unsigned NumElts) {
|
||||
for (unsigned i = 0; i != NumElts; ++i) {
|
||||
TypeNameInfo *TI =
|
||||
|
@ -110,11 +110,11 @@ MinimalAction::ObjcClassDeclaration(Scope *S, SourceLocation AtClassLoc,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/// ObjcForwardProtocolDeclaration -
|
||||
/// ActOnForwardProtocolDeclaration -
|
||||
/// Scope will always be top level file scope.
|
||||
Action::DeclTy *
|
||||
MinimalAction::ObjcForwardProtocolDeclaration(Scope *S, SourceLocation AtClassLoc,
|
||||
IdentifierInfo **IdentList, unsigned NumElts) {
|
||||
MinimalAction::ActOnForwardProtocolDeclaration(Scope *S,
|
||||
SourceLocation AtClassLoc, IdentifierInfo **IdentList, unsigned NumElts) {
|
||||
for (unsigned i = 0; i != NumElts; ++i) {
|
||||
TypeNameInfo *TI =
|
||||
new TypeNameInfo(1, IdentList[i]->getFETokenInfo<TypeNameInfo>());
|
||||
|
|
|
@ -80,7 +80,7 @@ Parser::DeclTy *Parser::ParseObjCAtClassDeclaration(SourceLocation atLoc) {
|
|||
if (ExpectAndConsume(tok::semi, diag::err_expected_semi_after, "@class"))
|
||||
return 0;
|
||||
|
||||
return Actions.ObjcClassDeclaration(CurScope, atLoc,
|
||||
return Actions.ActOnForwardClassDeclaration(CurScope, atLoc,
|
||||
&ClassNames[0], ClassNames.size());
|
||||
}
|
||||
|
||||
|
@ -684,9 +684,9 @@ Parser::DeclTy *Parser::ParseObjCMethodDecl(tok::TokenKind mType,
|
|||
methodAttrs = ParseAttributes();
|
||||
|
||||
Selector Sel = ObjcGetKeywordSelector(KeyIdents);
|
||||
return Actions.ObjcBuildMethodDeclaration(mLoc, mType, ReturnType, Sel,
|
||||
&KeyTypes[0], &ArgNames[0],
|
||||
methodAttrs, MethodImplKind);
|
||||
return Actions.ActOnMethodDeclaration(mLoc, mType, ReturnType, Sel,
|
||||
&KeyTypes[0], &ArgNames[0],
|
||||
methodAttrs, MethodImplKind);
|
||||
} else if (!selIdent) {
|
||||
Diag(Tok, diag::err_expected_ident); // missing selector name.
|
||||
}
|
||||
|
@ -695,8 +695,8 @@ Parser::DeclTy *Parser::ParseObjCMethodDecl(tok::TokenKind mType,
|
|||
methodAttrs = ParseAttributes();
|
||||
|
||||
Selector Sel = ObjcGetUnarySelector(selIdent);
|
||||
return Actions.ObjcBuildMethodDeclaration(mLoc, mType, ReturnType, Sel,
|
||||
0, 0, methodAttrs, MethodImplKind);
|
||||
return Actions.ActOnMethodDeclaration(mLoc, mType, ReturnType, Sel,
|
||||
0, 0, methodAttrs, MethodImplKind);
|
||||
}
|
||||
|
||||
/// objc-protocol-refs:
|
||||
|
@ -866,9 +866,9 @@ Parser::DeclTy *Parser::ParseObjCAtProtocolDeclaration(SourceLocation AtLoc) {
|
|||
return 0;
|
||||
}
|
||||
if (ProtocolRefs.size() > 0)
|
||||
return Actions.ObjcForwardProtocolDeclaration(CurScope, AtLoc,
|
||||
&ProtocolRefs[0],
|
||||
ProtocolRefs.size());
|
||||
return Actions.ActOnForwardProtocolDeclaration(CurScope, AtLoc,
|
||||
&ProtocolRefs[0],
|
||||
ProtocolRefs.size());
|
||||
// Last, and definitely not least, parse a protocol declaration.
|
||||
if (Tok.getKind() == tok::less) {
|
||||
if (ParseObjCProtocolReferences(ProtocolRefs))
|
||||
|
|
|
@ -415,19 +415,19 @@ public:
|
|||
IdentifierInfo *CatName,
|
||||
SourceLocation CatLoc);
|
||||
|
||||
virtual DeclTy *ObjcClassDeclaration(Scope *S, SourceLocation AtClassLoc,
|
||||
IdentifierInfo **IdentList,
|
||||
unsigned NumElts);
|
||||
virtual DeclTy *ActOnForwardClassDeclaration(Scope *S, SourceLocation Loc,
|
||||
IdentifierInfo **IdentList,
|
||||
unsigned NumElts);
|
||||
|
||||
virtual DeclTy *ObjcForwardProtocolDeclaration(Scope *S,
|
||||
SourceLocation AtProtocolLoc,
|
||||
IdentifierInfo **IdentList,
|
||||
unsigned NumElts);
|
||||
virtual DeclTy *ActOnForwardProtocolDeclaration(Scope *S,
|
||||
SourceLocation AtProtocolLoc,
|
||||
IdentifierInfo **IdentList,
|
||||
unsigned NumElts);
|
||||
|
||||
virtual void ObjcAddMethodsToClass(Scope* S, DeclTy *ClassDecl,
|
||||
DeclTy **allMethods, unsigned allNum);
|
||||
|
||||
virtual DeclTy *ObjcBuildMethodDeclaration(SourceLocation MethodLoc,
|
||||
virtual DeclTy *ActOnMethodDeclaration(SourceLocation MethodLoc,
|
||||
tok::TokenKind MethodType, TypeTy *ReturnType, Selector Sel,
|
||||
// optional arguments. The number of types/arguments is obtained
|
||||
// from the Sel.getNumArgs().
|
||||
|
|
|
@ -1006,10 +1006,10 @@ Sema::DeclTy *Sema::ObjcStartProtoInterface(Scope* S,
|
|||
return PDecl;
|
||||
}
|
||||
|
||||
/// ObjcForwardProtocolDeclaration -
|
||||
/// ActOnForwardProtocolDeclaration -
|
||||
/// Scope will always be top level file scope.
|
||||
Action::DeclTy *
|
||||
Sema::ObjcForwardProtocolDeclaration(Scope *S, SourceLocation AtProtocolLoc,
|
||||
Sema::ActOnForwardProtocolDeclaration(Scope *S, SourceLocation AtProtocolLoc,
|
||||
IdentifierInfo **IdentList, unsigned NumElts) {
|
||||
ObjcForwardProtocolDecl *FDecl = new ObjcForwardProtocolDecl(AtProtocolLoc,
|
||||
NumElts);
|
||||
|
@ -1343,11 +1343,12 @@ void Sema::ImplCategoryMethodsVsIntfMethods(ObjcCategoryImplDecl *CatImplDecl,
|
|||
CatClassDecl->getCatName()->getName());
|
||||
}
|
||||
|
||||
/// ObjcClassDeclaration -
|
||||
/// ActOnForwardClassDeclaration -
|
||||
/// Scope will always be top level file scope.
|
||||
Action::DeclTy *
|
||||
Sema::ObjcClassDeclaration(Scope *S, SourceLocation AtClassLoc,
|
||||
IdentifierInfo **IdentList, unsigned NumElts) {
|
||||
Sema::ActOnForwardClassDeclaration(Scope *S, SourceLocation AtClassLoc,
|
||||
IdentifierInfo **IdentList, unsigned NumElts)
|
||||
{
|
||||
ObjcClassDecl *CDecl = new ObjcClassDecl(AtClassLoc, NumElts);
|
||||
|
||||
for (unsigned i = 0; i != NumElts; ++i) {
|
||||
|
@ -1750,7 +1751,7 @@ void Sema::ObjcAddMethodsToClass(Scope* S, DeclTy *ClassDecl,
|
|||
return;
|
||||
}
|
||||
|
||||
Sema::DeclTy *Sema::ObjcBuildMethodDeclaration(SourceLocation MethodLoc,
|
||||
Sema::DeclTy *Sema::ActOnMethodDeclaration(SourceLocation MethodLoc,
|
||||
tok::TokenKind MethodType, TypeTy *ReturnType, Selector Sel,
|
||||
// optional arguments. The number of types/arguments is obtained
|
||||
// from the Sel.getNumArgs().
|
||||
|
|
|
@ -737,7 +737,6 @@
|
|||
08FB7793FE84155DC02AAC07 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "clang" */;
|
||||
compatibilityVersion = "Xcode 2.4";
|
||||
hasScannedForEncodings = 1;
|
||||
mainGroup = 08FB7794FE84155DC02AAC07 /* clang */;
|
||||
projectDirPath = "";
|
||||
|
|
|
@ -476,7 +476,7 @@ public:
|
|||
SourceLocation CatLoc) {
|
||||
return 0;
|
||||
}
|
||||
virtual DeclTy *ObjcBuildMethodDeclaration(SourceLocation MethodLoc,
|
||||
virtual DeclTy *ActOnMethodDeclaration(SourceLocation MethodLoc,
|
||||
tok::TokenKind MethodType, TypeTy *ReturnType, Selector Sel,
|
||||
// optional arguments. The number of types/arguments is obtained
|
||||
// from the Sel.getNumArgs().
|
||||
|
@ -500,26 +500,20 @@ public:
|
|||
SourceLocation lbrac, SourceLocation rbrac, ExprTy **ArgExprs) {
|
||||
return 0;
|
||||
}
|
||||
virtual DeclTy *ObjcClassDeclaration(Scope *S, SourceLocation AtClassLoc,
|
||||
IdentifierInfo **IdentList,
|
||||
unsigned NumElts) {
|
||||
virtual DeclTy *ActOnForwardClassDeclaration(Scope *S,
|
||||
SourceLocation AtClassLoc,
|
||||
IdentifierInfo **IdentList,
|
||||
unsigned NumElts) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual DeclTy *ObjcForwardProtocolDeclaration(Scope *S,
|
||||
SourceLocation AtProtocolLoc,
|
||||
IdentifierInfo **IdentList,
|
||||
unsigned NumElts) {
|
||||
virtual DeclTy *ActOnForwardProtocolDeclaration(Scope *S,
|
||||
SourceLocation AtProtocolLoc,
|
||||
IdentifierInfo **IdentList,
|
||||
unsigned NumElts) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual void ObjCStartCategoryInterface() { // FIXME
|
||||
return;
|
||||
}
|
||||
virtual void ObjCFinishInterface() {
|
||||
return;
|
||||
}
|
||||
|
||||
//===----------------------- Obj-C Expressions --------------------------===//
|
||||
virtual ExprResult ParseObjCStringLiteral(ExprTy *string) {
|
||||
return 0;
|
||||
|
@ -555,14 +549,15 @@ public:
|
|||
/// they are removed from the IdentifierInfo::FETokenInfo field.
|
||||
virtual void PopScope(SourceLocation Loc, Scope *S);
|
||||
|
||||
virtual DeclTy *ObjcClassDeclaration(Scope *S, SourceLocation AtClassLoc,
|
||||
IdentifierInfo **IdentList,
|
||||
unsigned NumElts);
|
||||
virtual DeclTy *ActOnForwardClassDeclaration(Scope *S,
|
||||
SourceLocation AtClassLoc,
|
||||
IdentifierInfo **IdentList,
|
||||
unsigned NumElts);
|
||||
|
||||
virtual DeclTy *ObjcForwardProtocolDeclaration(Scope *S,
|
||||
SourceLocation AtProtocolLoc,
|
||||
IdentifierInfo **IdentList,
|
||||
unsigned NumElts);
|
||||
virtual DeclTy *ActOnForwardProtocolDeclaration(Scope *S,
|
||||
SourceLocation AtProtocolLoc,
|
||||
IdentifierInfo **IdentList,
|
||||
unsigned NumElts);
|
||||
|
||||
virtual DeclTy *ObjcStartClassInterface(Scope* S, SourceLocation AtInterafceLoc,
|
||||
IdentifierInfo *ClassName, SourceLocation ClassLoc,
|
||||
|
|
Loading…
Reference in New Issue