}
Action::DeclTy *
-MinimalAction::ObjcStartClassInterface(Scope* S, SourceLocation AtInterafceLoc,
+MinimalAction::ActOnStartClassInterface(Scope* S, SourceLocation AtInterafceLoc,
IdentifierInfo *ClassName, SourceLocation ClassLoc,
IdentifierInfo *SuperName, SourceLocation SuperLoc,
IdentifierInfo **ProtocolNames, unsigned NumProtocols,
}
Action::DeclTy *
-MinimalAction::ObjcStartProtoInterface(Scope* S,
+MinimalAction::ActOnStartProtocolInterface(Scope* S,
SourceLocation AtProtoInterfaceLoc,
IdentifierInfo *ProtocolName, SourceLocation ProtocolLoc,
IdentifierInfo **ProtoRefNames, unsigned NumProtoRefs) {
if (attrList) // categories don't support attributes.
Diag(Tok, diag::err_objc_no_attributes_on_category);
- DeclTy *CategoryType = Actions.ObjcStartCatInterface(CurScope, atLoc,
- nameId, nameLoc,
- categoryId, categoryLoc,
- &ProtocolRefs[0],
- ProtocolRefs.size());
+ DeclTy *CategoryType = Actions.ActOnStartCategoryInterface(CurScope, atLoc,
+ nameId, nameLoc, categoryId, categoryLoc,
+ &ProtocolRefs[0], ProtocolRefs.size());
ParseObjCInterfaceDeclList(CategoryType, tok::objc_not_keyword);
if (ParseObjCProtocolReferences(ProtocolRefs))
return 0;
}
- DeclTy *ClsType = Actions.ObjcStartClassInterface(CurScope,
+ DeclTy *ClsType = Actions.ActOnStartClassInterface(CurScope,
atLoc, nameId, nameLoc,
superClassId, superClassLoc, &ProtocolRefs[0],
ProtocolRefs.size(), attrList);
}
}
/// Insert collected methods declarations into the @interface object.
- Actions.ObjcAddMethodsToClass(CurScope,
- interfaceDecl,&allMethods[0],allMethods.size());
+ Actions.ActOnAddMethodsToObjcDecl(CurScope, interfaceDecl,
+ &allMethods[0], allMethods.size());
}
/// Parse property attribute declarations.
return 0;
}
- DeclTy *ProtoType = Actions.ObjcStartProtoInterface(CurScope, AtLoc,
+ DeclTy *ProtoType = Actions.ActOnStartProtocolInterface(CurScope, AtLoc,
protocolName, nameLoc,
&ProtocolRefs[0],
ProtocolRefs.size());
return 0;
}
rparenLoc = ConsumeParen();
- DeclTy *ImplCatType = Actions.ObjcStartCategoryImplementation(CurScope,
+ DeclTy *ImplCatType = Actions.ActOnStartCategoryImplementation(CurScope,
atLoc, nameId, nameLoc, categoryId,
categoryLoc);
return ImplCatType;
superClassId = Tok.getIdentifierInfo();
superClassLoc = ConsumeToken(); // Consume super class name
}
- DeclTy *ImplClsType = Actions.ObjcStartClassImplementation(CurScope,
- atLoc,
- nameId, nameLoc,
+ DeclTy *ImplClsType = Actions.ActOnStartClassImplementation(CurScope,
+ atLoc, nameId, nameLoc,
superClassId, superClassLoc);
if (Tok.getKind() == tok::l_brace)
// @implementation not to have been parsed to completion and ObjcImpDecl
// could be 0.
/// Insert collected methods declarations into the @interface object.
- Actions.ObjcAddMethodsToClass(CurScope, ObjcImpDecl,
- &AllImplMethods[0],AllImplMethods.size());
+ Actions.ActOnAddMethodsToObjcDecl(CurScope, ObjcImpDecl,
+ &AllImplMethods[0],AllImplMethods.size());
ObjcImpDecl = 0;
AllImplMethods.clear();
}
SourceLocation RParenLoc);
// Objective-C declarations.
- virtual DeclTy *ObjcStartClassInterface(Scope* S,
+ virtual DeclTy *ActOnStartClassInterface(Scope* S,
SourceLocation AtInterafceLoc,
IdentifierInfo *ClassName, SourceLocation ClassLoc,
IdentifierInfo *SuperName, SourceLocation SuperLoc,
IdentifierInfo **ProtocolNames, unsigned NumProtocols,
AttributeList *AttrList);
- virtual DeclTy *ObjcStartProtoInterface(Scope* S,
+ virtual DeclTy *ActOnStartProtocolInterface(Scope* S,
SourceLocation AtProtoInterfaceLoc,
IdentifierInfo *ProtocolName, SourceLocation ProtocolLoc,
IdentifierInfo **ProtoRefNames, unsigned NumProtoRefs);
- virtual DeclTy *ObjcStartCatInterface(Scope* S,
+ virtual DeclTy *ActOnStartCategoryInterface(Scope* S,
SourceLocation AtInterfaceLoc,
IdentifierInfo *ClassName, SourceLocation ClassLoc,
IdentifierInfo *CategoryName, SourceLocation CategoryLoc,
IdentifierInfo **ProtoRefNames, unsigned NumProtoRefs);
- virtual DeclTy *ObjcStartClassImplementation(Scope* S,
+ virtual DeclTy *ActOnStartClassImplementation(Scope* S,
SourceLocation AtClassImplLoc,
IdentifierInfo *ClassName, SourceLocation ClassLoc,
IdentifierInfo *SuperClassname,
SourceLocation SuperClassLoc);
- virtual DeclTy *ObjcStartCategoryImplementation(Scope* S,
+ virtual DeclTy *ActOnStartCategoryImplementation(Scope* S,
SourceLocation AtCatImplLoc,
IdentifierInfo *ClassName,
SourceLocation ClassLoc,
IdentifierInfo **IdentList,
unsigned NumElts);
- virtual void ObjcAddMethodsToClass(Scope* S, DeclTy *ClassDecl,
- DeclTy **allMethods, unsigned allNum);
+ virtual void ActOnAddMethodsToObjcDecl(Scope* S, DeclTy *ClassDecl,
+ DeclTy **allMethods, unsigned allNum);
virtual DeclTy *ActOnMethodDeclaration(SourceLocation MethodLoc,
tok::TokenKind MethodType, TypeTy *ReturnType, Selector Sel,
return NewTD;
}
-Sema::DeclTy *Sema::ObjcStartClassInterface(Scope* S,
+Sema::DeclTy *Sema::ActOnStartClassInterface(Scope* S,
SourceLocation AtInterfaceLoc,
IdentifierInfo *ClassName, SourceLocation ClassLoc,
IdentifierInfo *SuperName, SourceLocation SuperLoc,
return IDecl;
}
-Sema::DeclTy *Sema::ObjcStartProtoInterface(Scope* S,
+Sema::DeclTy *Sema::ActOnStartProtocolInterface(Scope* S,
SourceLocation AtProtoInterfaceLoc,
IdentifierInfo *ProtocolName, SourceLocation ProtocolLoc,
IdentifierInfo **ProtoRefNames, unsigned NumProtoRefs) {
return FDecl;
}
-Sema::DeclTy *Sema::ObjcStartCatInterface(Scope* S,
+Sema::DeclTy *Sema::ActOnStartCategoryInterface(Scope* S,
SourceLocation AtInterfaceLoc,
IdentifierInfo *ClassName, SourceLocation ClassLoc,
IdentifierInfo *CategoryName, SourceLocation CategoryLoc,
return CDecl;
}
-/// ObjcStartCategoryImplementation - Perform semantic checks on the
+/// ActOnStartCategoryImplementation - Perform semantic checks on the
/// category implementation declaration and build an ObjcCategoryImplDecl
/// object.
-Sema::DeclTy *Sema::ObjcStartCategoryImplementation(Scope* S,
+Sema::DeclTy *Sema::ActOnStartCategoryImplementation(Scope* S,
SourceLocation AtCatImplLoc,
IdentifierInfo *ClassName, SourceLocation ClassLoc,
IdentifierInfo *CatName, SourceLocation CatLoc) {
return CDecl;
}
-Sema::DeclTy *Sema::ObjcStartClassImplementation(Scope *S,
+Sema::DeclTy *Sema::ActOnStartClassImplementation(Scope *S,
SourceLocation AtClassImplLoc,
IdentifierInfo *ClassName, SourceLocation ClassLoc,
IdentifierInfo *SuperClassname,
}
}
-void Sema::ObjcAddMethodsToClass(Scope* S, DeclTy *ClassDecl,
- DeclTy **allMethods, unsigned allNum) {
+void Sema::ActOnAddMethodsToObjcDecl(Scope* S, DeclTy *ClassDecl,
+ DeclTy **allMethods, unsigned allNum) {
// FIXME: Fix this when we can handle methods declared in protocols.
// See Parser::ParseObjCAtProtocolDeclaration
if (!ClassDecl)
}
}
else
- assert(0 && "Sema::ObjcAddMethodsToClass(): Unknown DeclTy");
+ assert(0 && "Sema::ActOnAddMethodsToObjcDecl(): Unknown DeclTy");
return;
}
08FB7793FE84155DC02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "clang" */;
- compatibilityVersion = "Xcode 2.4";
hasScannedForEncodings = 1;
mainGroup = 08FB7794FE84155DC02AAC07 /* clang */;
projectDirPath = "";
}
//===----------------------- Obj-C Declarations -------------------------===//
- virtual DeclTy *ObjcStartClassInterface(Scope* S, SourceLocation AtInterafceLoc,
- IdentifierInfo *ClassName, SourceLocation ClassLoc,
- IdentifierInfo *SuperName, SourceLocation SuperLoc,
- IdentifierInfo **ProtocolNames, unsigned NumProtocols,
- AttributeList *AttrList) {
- return 0;
- }
- virtual void ObjcAddMethodsToClass(Scope* S, DeclTy *ClassDecl,
- DeclTy **allMethods, unsigned allNum) {
- return;
- }
- virtual DeclTy *ObjcStartProtoInterface(Scope* S,
- SourceLocation AtProtoInterfaceLoc,
- IdentifierInfo *ProtocolName, SourceLocation ProtocolLoc,
- IdentifierInfo **ProtoRefNames, unsigned NumProtoRefs) {
- return 0;
- }
- virtual DeclTy *ObjcStartCatInterface(Scope* S,
- SourceLocation AtInterfaceLoc,
- IdentifierInfo *ClassName, SourceLocation ClassLoc,
- IdentifierInfo *CategoryName, SourceLocation CategoryLoc,
- IdentifierInfo **ProtoRefNames, unsigned NumProtoRefs) {
- return 0;
- }
- virtual DeclTy *ObjcStartClassImplementation(Scope* S,
- SourceLocation AtClassImplLoc,
- IdentifierInfo *ClassName, SourceLocation ClassLoc,
- IdentifierInfo *SuperClassname,
- SourceLocation SuperClassLoc) {
- return 0;
- }
- virtual DeclTy *ObjcStartCategoryImplementation(Scope* S,
- SourceLocation AtCatImplLoc,
- IdentifierInfo *ClassName,
- SourceLocation ClassLoc,
- IdentifierInfo *CatName,
- SourceLocation CatLoc) {
+ // ActOnStartClassInterface - this action is called immdiately after parsing
+ // the prologue for a class interface (before parsing the instance
+ // variables). Instance variables are processed by ActOnFields().
+ virtual DeclTy *ActOnStartClassInterface(
+ Scope* S,
+ SourceLocation AtInterafceLoc,
+ IdentifierInfo *ClassName,
+ SourceLocation ClassLoc,
+ IdentifierInfo *SuperName,
+ SourceLocation SuperLoc,
+ IdentifierInfo **ProtocolNames,
+ unsigned NumProtocols,
+ AttributeList *AttrList) {
+ return 0;
+ }
+ // ActOnStartProtocolInterface - this action is called immdiately after
+ // parsing the prologue for a protocol interface.
+ virtual DeclTy *ActOnStartProtocolInterface(
+ Scope* S,
+ SourceLocation AtProtoInterfaceLoc,
+ IdentifierInfo *ProtocolName,
+ SourceLocation ProtocolLoc,
+ IdentifierInfo **ProtoRefNames,
+ unsigned NumProtoRefs) {
+ return 0;
+ }
+ // ActOnStartCategoryInterface - this action is called immdiately after
+ // parsing the prologue for a category interface.
+ virtual DeclTy *ActOnStartCategoryInterface(
+ Scope* S,
+ SourceLocation AtInterfaceLoc,
+ IdentifierInfo *ClassName,
+ SourceLocation ClassLoc,
+ IdentifierInfo *CategoryName,
+ SourceLocation CategoryLoc,
+ IdentifierInfo **ProtoRefNames,
+ unsigned NumProtoRefs) {
+ return 0;
+ }
+ // ActOnStartClassImplementation - this action is called immdiately after
+ // parsing the prologue for a class implementation. Instance variables are
+ // processed by ActOnFields().
+ virtual DeclTy *ActOnStartClassImplementation(
+ Scope* S,
+ SourceLocation AtClassImplLoc,
+ IdentifierInfo *ClassName,
+ SourceLocation ClassLoc,
+ IdentifierInfo *SuperClassname,
+ SourceLocation SuperClassLoc) {
+ return 0;
+ }
+ // ActOnStartCategoryImplementation - this action is called immdiately after
+ // parsing the prologue for a category implementation.
+ virtual DeclTy *ActOnStartCategoryImplementation(
+ Scope* S,
+ SourceLocation AtCatImplLoc,
+ IdentifierInfo *ClassName,
+ SourceLocation ClassLoc,
+ IdentifierInfo *CatName,
+ SourceLocation CatLoc) {
return 0;
}
- 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().
- TypeTy **ArgTypes, IdentifierInfo **ArgNames,
- AttributeList *AttrList, tok::ObjCKeywordKind MethodImplKind) {
- return 0;
+ // ActOnMethodDeclaration - called for all method declarations.
+ virtual DeclTy *ActOnMethodDeclaration(
+ SourceLocation MethodLoc,
+ tok::TokenKind MethodType, // tok::minus for instance, tok::plus for class.
+ TypeTy *ReturnType, // the method return type.
+ Selector Sel, // a unique name for the method.
+ TypeTy **ArgTypes, // non-zero when Sel.getNumArgs() > 0
+ IdentifierInfo **ArgNames, // non-zero when Sel.getNumArgs() > 0
+ AttributeList *AttrList, // optional
+ // tok::objc_not_keyword, tok::objc_optional, tok::objc_required
+ tok::ObjCKeywordKind impKind) {
+ return 0;
+ }
+ // ActOnAddMethodsToObjcDecl - called to associate methods with an interface,
+ // protocol, category, or implementation.
+ virtual void ActOnAddMethodsToObjcDecl(
+ Scope* S,
+ DeclTy *ClassDecl,
+ DeclTy **allMethods,
+ unsigned allNum) {
+ return;
}
// ActOnClassMessage - used for both unary and keyword messages.
// ArgExprs is optional - if it is present, the number of expressions
// is obtained from Sel.getNumArgs().
virtual ExprResult ActOnClassMessage(
- IdentifierInfo *receivingClassName, Selector Sel,
- SourceLocation lbrac, SourceLocation rbrac, ExprTy **ArgExprs) {
+ IdentifierInfo *receivingClassName,
+ Selector Sel,
+ SourceLocation lbrac,
+ SourceLocation rbrac,
+ ExprTy **ArgExprs) {
return 0;
}
// ActOnInstanceMessage - used for both unary and keyword messages.
SourceLocation lbrac, SourceLocation rbrac, ExprTy **ArgExprs) {
return 0;
}
- virtual DeclTy *ActOnForwardClassDeclaration(Scope *S,
- SourceLocation AtClassLoc,
- IdentifierInfo **IdentList,
- unsigned NumElts) {
+ virtual DeclTy *ActOnForwardClassDeclaration(
+ Scope *S,
+ SourceLocation AtClassLoc,
+ IdentifierInfo **IdentList,
+ unsigned NumElts) {
return 0;
}
-
- virtual DeclTy *ActOnForwardProtocolDeclaration(Scope *S,
- SourceLocation AtProtocolLoc,
- IdentifierInfo **IdentList,
- unsigned NumElts) {
+ virtual DeclTy *ActOnForwardProtocolDeclaration(
+ Scope *S,
+ SourceLocation AtProtocolLoc,
+ IdentifierInfo **IdentList,
+ unsigned NumElts) {
return 0;
}
IdentifierInfo **IdentList,
unsigned NumElts);
- virtual DeclTy *ObjcStartClassInterface(Scope* S, SourceLocation AtInterafceLoc,
+ virtual DeclTy *ActOnStartClassInterface(Scope* S, SourceLocation AtInterafceLoc,
IdentifierInfo *ClassName, SourceLocation ClassLoc,
IdentifierInfo *SuperName, SourceLocation SuperLoc,
IdentifierInfo **ProtocolNames, unsigned NumProtocols,
AttributeList *AttrList);
- virtual DeclTy *ObjcStartProtoInterface(Scope *S,
+ virtual DeclTy *ActOnStartProtocolInterface(Scope *S,
SourceLocation AtProtoInterfaceLoc,
IdentifierInfo *ProtocolName, SourceLocation ProtocolLoc,
IdentifierInfo **ProtoRefNames, unsigned NumProtoRefs);