diff --git a/clang/Driver/PrintParserCallbacks.cpp b/clang/Driver/PrintParserCallbacks.cpp index 3e37514bb288..0ed922371f08 100644 --- a/clang/Driver/PrintParserCallbacks.cpp +++ b/clang/Driver/PrintParserCallbacks.cpp @@ -22,12 +22,12 @@ using namespace clang; namespace { class ParserPrintActions : public MinimalAction { - /// ParseDeclarator - This callback is invoked when a declarator is parsed + /// ActOnDeclarator - This callback is invoked when a declarator is parsed /// and 'Init' specifies the initializer if any. This is for things like: /// "int X = 4" or "typedef int foo". - virtual DeclTy *ParseDeclarator(Scope *S, Declarator &D, + virtual DeclTy *ActOnDeclarator(Scope *S, Declarator &D, DeclTy *LastInGroup) { - std::cout << "ParseDeclarator "; + std::cout << "ActOnDeclarator "; if (IdentifierInfo *II = D.getIdentifier()) { std::cout << "'" << II->getName() << "'"; } else { @@ -36,7 +36,7 @@ namespace { std::cout << "\n"; // Pass up to EmptyActions so that the symbol table is maintained right. - return MinimalAction::ParseDeclarator(S, D, LastInGroup); + return MinimalAction::ActOnDeclarator(S, D, LastInGroup); } /// PopScope - This callback is called immediately before the specified scope diff --git a/clang/Parse/MinimalAction.cpp b/clang/Parse/MinimalAction.cpp index 377a2e7732be..019e652dde80 100644 --- a/clang/Parse/MinimalAction.cpp +++ b/clang/Parse/MinimalAction.cpp @@ -39,11 +39,11 @@ MinimalAction::isTypeName(const IdentifierInfo &II, Scope *S) const { return 0; } -/// ParseDeclarator - If this is a typedef declarator, we modify the +/// ActOnDeclarator - If this is a typedef declarator, we modify the /// IdentifierInfo::FETokenInfo field to keep track of this fact, until S is /// popped. Action::DeclTy * -MinimalAction::ParseDeclarator(Scope *S, Declarator &D, DeclTy *LastInGroup) { +MinimalAction::ActOnDeclarator(Scope *S, Declarator &D, DeclTy *LastInGroup) { IdentifierInfo *II = D.getIdentifier(); // If there is no identifier associated with this declarator, bail out. diff --git a/clang/Parse/ParseDecl.cpp b/clang/Parse/ParseDecl.cpp index 9dd0d95d7908..7fbab64d11e3 100644 --- a/clang/Parse/ParseDecl.cpp +++ b/clang/Parse/ParseDecl.cpp @@ -33,7 +33,7 @@ Parser::TypeTy *Parser::ParseTypeName() { Declarator DeclaratorInfo(DS, Declarator::TypeNameContext); ParseDeclarator(DeclaratorInfo); - return Actions.ParseTypeName(CurScope, DeclaratorInfo).Val; + return Actions.ActOnTypeName(CurScope, DeclaratorInfo).Val; } /// ParseAttributes - Parse a non-empty attributes list. @@ -265,7 +265,7 @@ ParseInitDeclaratorListAfterFirstDeclarator(Declarator &D) { // Inform the current actions module that we just parsed this declarator. // FIXME: pass asm & attributes. - LastDeclInGroup = Actions.ParseDeclarator(CurScope, D, LastDeclInGroup); + LastDeclInGroup = Actions.ActOnDeclarator(CurScope, D, LastDeclInGroup); // Parse declarator '=' initializer. ExprResult Init; @@ -589,7 +589,7 @@ bool Parser::ParseTag(DeclTy *&Decl, unsigned TagType, SourceLocation StartLoc){ TK = Action::TK_Declaration; else TK = Action::TK_Reference; - Decl = Actions.ParseTag(CurScope, TagType, TK, StartLoc, Name, NameLoc, Attr); + Decl = Actions.ActOnTag(CurScope, TagType, TK, StartLoc, Name, NameLoc, Attr); return false; } @@ -686,7 +686,7 @@ void Parser::ParseStructDeclaration(DeclTy *TagDecl, DeclaratorInfo.AddAttributes(ParseAttributes()); // Install the declarator into the current TagDecl. - DeclTy *Field = Actions.ParseField(CurScope, TagDecl, SpecQualLoc, + DeclTy *Field = Actions.ActOnField(CurScope, TagDecl, SpecQualLoc, DeclaratorInfo, BitfieldSize); FieldDecls.push_back(Field); @@ -757,7 +757,7 @@ void Parser::ParseStructUnionBody(SourceLocation RecordLoc, MatchRHSPunctuation(tok::r_brace, LBraceLoc); - Actions.ProcessFieldDecls(RecordLoc,TagDecl,&FieldDecls[0],FieldDecls.size()); + Actions.ActOnFields(RecordLoc,TagDecl,&FieldDecls[0],FieldDecls.size()); AttributeList *AttrList = 0; // If attributes exist after struct contents, parse them. @@ -830,7 +830,7 @@ void Parser::ParseEnumBody(SourceLocation StartLoc, DeclTy *EnumDecl) { } // Install the enumerator constant into EnumDecl. - DeclTy *EnumConstDecl = Actions.ParseEnumConstant(CurScope, EnumDecl, + DeclTy *EnumConstDecl = Actions.ActOnEnumConstant(CurScope, EnumDecl, LastEnumConstDecl, IdentLoc, Ident, EqualLoc, AssignedVal); @@ -848,7 +848,7 @@ void Parser::ParseEnumBody(SourceLocation StartLoc, DeclTy *EnumDecl) { // Eat the }. MatchRHSPunctuation(tok::r_brace, LBraceLoc); - Actions.ParseEnumBody(StartLoc, EnumDecl, &EnumConstantDecls[0], + Actions.ActOnEnumBody(StartLoc, EnumDecl, &EnumConstantDecls[0], EnumConstantDecls.size()); DeclTy *AttrList = 0; @@ -1322,7 +1322,7 @@ void Parser::ParseParenDeclarator(Declarator &D) { // Inform the actions module about the parameter declarator, so it gets // added to the current scope. Action::TypeResult ParamTy = - Actions.ParseParamDeclaratorType(CurScope, ParmDecl); + Actions.ActOnParamDeclaratorType(CurScope, ParmDecl); // Remember this parsed parameter in ParamInfo. IdentifierInfo *ParmII = ParmDecl.getIdentifier(); diff --git a/clang/Parse/ParseExpr.cpp b/clang/Parse/ParseExpr.cpp index f030e5d91d5b..95c305ec088d 100644 --- a/clang/Parse/ParseExpr.cpp +++ b/clang/Parse/ParseExpr.cpp @@ -200,7 +200,7 @@ ParseExpressionWithLeadingIdentifier(const Token &IdTok) { // primary-expression: identifier // Let the actions module handle the identifier. - ExprResult Res = Actions.ParseIdentifierExpr(CurScope, IdTok.getLocation(), + ExprResult Res = Actions.ActOnIdentifierExpr(CurScope, IdTok.getLocation(), *IdTok.getIdentifierInfo(), Tok.getKind() == tok::l_paren); @@ -231,7 +231,7 @@ ParseAssignmentExprWithLeadingIdentifier(const Token &IdTok) { // primary-expression: identifier // Let the actions module handle the identifier. - ExprResult Res = Actions.ParseIdentifierExpr(CurScope, IdTok.getLocation(), + ExprResult Res = Actions.ActOnIdentifierExpr(CurScope, IdTok.getLocation(), *IdTok.getIdentifierInfo(), Tok.getKind() == tok::l_paren); @@ -513,7 +513,7 @@ Parser::ExprResult Parser::ParseCastExpression(bool isUnaryExpression) { // not. IdentifierInfo &II = *Tok.getIdentifierInfo(); SourceLocation L = ConsumeToken(); - Res = Actions.ParseIdentifierExpr(CurScope, L, II, + Res = Actions.ActOnIdentifierExpr(CurScope, L, II, Tok.getKind() == tok::l_paren); // These can be followed by postfix-expr pieces. return ParsePostfixExpressionSuffix(Res); diff --git a/clang/Parse/ParseObjc.cpp b/clang/Parse/ParseObjc.cpp index 791057b627ad..8fa071a3fe8d 100644 --- a/clang/Parse/ParseObjc.cpp +++ b/clang/Parse/ParseObjc.cpp @@ -659,9 +659,9 @@ void Parser::ParseObjCClassInstanceVariables(DeclTy *interfaceDecl) { } } if (AllIvarDecls.size()) { // Check for {} - no ivars in braces - Actions.ProcessFieldDecls(LBraceLoc, interfaceDecl, - &AllIvarDecls[0], AllIvarDecls.size(), - &AllVisibilities[0]); + Actions.ActOnFields(LBraceLoc, interfaceDecl, + &AllIvarDecls[0], AllIvarDecls.size(), + &AllVisibilities[0]); } MatchRHSPunctuation(tok::r_brace, LBraceLoc); return; diff --git a/clang/Parse/Parser.cpp b/clang/Parse/Parser.cpp index 21ef54da0ff0..b9bcc929a5f6 100644 --- a/clang/Parse/Parser.cpp +++ b/clang/Parse/Parser.cpp @@ -242,7 +242,7 @@ void Parser::Initialize() { Declarator D(DS, Declarator::FileContext); D.SetIdentifier(PP.getIdentifierInfo("__builtin_va_list"),SourceLocation()); - Actions.ParseDeclarator(CurScope, D, 0); + Actions.ActOnDeclarator(CurScope, D, 0); } if (Tok.getKind() == tok::eof && @@ -547,7 +547,7 @@ void Parser::ParseKNRParamDeclarations(Declarator &D) { // Ask the actions module to compute the type for this declarator. Action::TypeResult TR = - Actions.ParseParamDeclaratorType(CurScope, ParmDeclarator); + Actions.ActOnParamDeclaratorType(CurScope, ParmDeclarator); if (!TR.isInvalid && // A missing identifier has already been diagnosed. diff --git a/clang/Sema/Sema.h b/clang/Sema/Sema.h index a9e33f423a23..e304f07eeaeb 100644 --- a/clang/Sema/Sema.h +++ b/clang/Sema/Sema.h @@ -130,15 +130,15 @@ public: // QualType GetTypeForDeclarator(Declarator &D, Scope *S); - virtual TypeResult ParseTypeName(Scope *S, Declarator &D); + virtual TypeResult ActOnTypeName(Scope *S, Declarator &D); - virtual TypeResult ParseParamDeclaratorType(Scope *S, Declarator &D); + virtual TypeResult ActOnParamDeclaratorType(Scope *S, Declarator &D); private: //===--------------------------------------------------------------------===// // Symbol table / Decl tracking callbacks: SemaDecl.cpp. // virtual DeclTy *isTypeName(const IdentifierInfo &II, Scope *S) const; - virtual DeclTy *ParseDeclarator(Scope *S, Declarator &D, DeclTy *LastInGroup); + virtual DeclTy *ActOnDeclarator(Scope *S, Declarator &D, DeclTy *LastInGroup); void AddInitializerToDecl(DeclTy *dcl, ExprTy *init); virtual DeclTy *FinalizeDeclaratorGroup(Scope *S, DeclTy *Group); @@ -150,24 +150,24 @@ private: /// no declarator (e.g. "struct foo;") is parsed. virtual DeclTy *ParsedFreeStandingDeclSpec(Scope *S, DeclSpec &DS); - virtual DeclTy *ParseTag(Scope *S, unsigned TagType, TagKind TK, + virtual DeclTy *ActOnTag(Scope *S, unsigned TagType, TagKind TK, SourceLocation KWLoc, IdentifierInfo *Name, SourceLocation NameLoc, AttributeList *Attr); - virtual DeclTy *ParseField(Scope *S, DeclTy *TagDecl,SourceLocation DeclStart, + virtual DeclTy *ActOnField(Scope *S, DeclTy *TagDecl,SourceLocation DeclStart, Declarator &D, ExprTy *BitfieldWidth); // This is used for both record definitions and ObjC interface declarations. - virtual void ProcessFieldDecls(SourceLocation RecLoc, DeclTy *TagDecl, + virtual void ActOnFields(SourceLocation RecLoc, DeclTy *TagDecl, DeclTy **Fields, unsigned NumFields, tok::ObjCKeywordKind *visibility = 0); - virtual DeclTy *ParseEnumConstant(Scope *S, DeclTy *EnumDecl, + virtual DeclTy *ActOnEnumConstant(Scope *S, DeclTy *EnumDecl, DeclTy *LastEnumConstant, SourceLocation IdLoc, IdentifierInfo *Id, SourceLocation EqualLoc, ExprTy *Val); - virtual void ParseEnumBody(SourceLocation EnumLoc, DeclTy *EnumDecl, + virtual void ActOnEnumBody(SourceLocation EnumLoc, DeclTy *EnumDecl, DeclTy **Elements, unsigned NumElements); private: - /// Subroutines of ParseDeclarator()... + /// Subroutines of ActOnDeclarator()... TypedefDecl *ParseTypedefDecl(Scope *S, Declarator &D, ScopedDecl *LastDecl); TypedefDecl *MergeTypeDefDecl(TypedefDecl *New, ScopedDecl *Old); FunctionDecl *MergeFunctionDecl(FunctionDecl *New, ScopedDecl *Old); @@ -250,7 +250,7 @@ public: // Expression Parsing Callbacks: SemaExpr.cpp. // Primary Expressions. - virtual ExprResult ParseIdentifierExpr(Scope *S, SourceLocation Loc, + virtual ExprResult ActOnIdentifierExpr(Scope *S, SourceLocation Loc, IdentifierInfo &II, bool HasTrailingLParen); virtual ExprResult ParsePreDefinedExpr(SourceLocation Loc, diff --git a/clang/Sema/SemaDecl.cpp b/clang/Sema/SemaDecl.cpp index b0a3a1266aca..b792b525cc49 100644 --- a/clang/Sema/SemaDecl.cpp +++ b/clang/Sema/SemaDecl.cpp @@ -430,7 +430,7 @@ bool Sema::CheckInitializer(Expr *&Init, QualType &DeclType, bool isStatic) { } Sema::DeclTy * -Sema::ParseDeclarator(Scope *S, Declarator &D, DeclTy *lastDecl) { +Sema::ActOnDeclarator(Scope *S, Declarator &D, DeclTy *lastDecl) { ScopedDecl *LastDeclarator = dyn_cast_or_null((Decl *)lastDecl); IdentifierInfo *II = D.getIdentifier(); @@ -759,7 +759,7 @@ Sema::DeclTy *Sema::ParseStartOfFunctionDef(Scope *FnBodyScope, Declarator &D) { Scope *GlobalScope = FnBodyScope->getParent(); FunctionDecl *FD = - static_cast(ParseDeclarator(GlobalScope, D, 0)); + static_cast(ActOnDeclarator(GlobalScope, D, 0)); CurFunctionDecl = FD; // Create Decl objects for each parameter, adding them to the FunctionDecl. @@ -842,7 +842,7 @@ Decl *Sema::ImplicitlyDefineFunction(SourceLocation Loc, IdentifierInfo &II, while (S->getParent()) S = S->getParent(); - return static_cast(ParseDeclarator(S, D, 0)); + return static_cast(ActOnDeclarator(S, D, 0)); } @@ -902,11 +902,11 @@ Sema::ObjcClassDeclaration(Scope *S, SourceLocation AtClassLoc, } -/// ParseTag - This is invoked when we see 'struct foo' or 'struct {'. In the +/// ActOnTag - This is invoked when we see 'struct foo' or 'struct {'. In the /// former case, Name will be non-null. In the later case, Name will be null. /// TagType indicates what kind of tag this is. TK indicates whether this is a /// reference/declaration/definition of a tag. -Sema::DeclTy *Sema::ParseTag(Scope *S, unsigned TagType, TagKind TK, +Sema::DeclTy *Sema::ActOnTag(Scope *S, unsigned TagType, TagKind TK, SourceLocation KWLoc, IdentifierInfo *Name, SourceLocation NameLoc, AttributeList *Attr) { // If this is a use of an existing tag, it must have a name. @@ -1004,9 +1004,9 @@ Sema::DeclTy *Sema::ParseTag(Scope *S, unsigned TagType, TagKind TK, return New; } -/// ParseField - Each field of a struct/union/class is passed into this in order +/// ActOnField - Each field of a struct/union/class is passed into this in order /// to create a FieldDecl object for it. -Sema::DeclTy *Sema::ParseField(Scope *S, DeclTy *TagDecl, +Sema::DeclTy *Sema::ActOnField(Scope *S, DeclTy *TagDecl, SourceLocation DeclStart, Declarator &D, ExprTy *BitfieldWidth) { IdentifierInfo *II = D.getIdentifier(); @@ -1051,7 +1051,7 @@ Sema::DeclTy *Sema::ParseField(Scope *S, DeclTy *TagDecl, else if (isa(static_cast(TagDecl))) NewFD = new ObjcIvarDecl(Loc, II, T); else - assert(0 && "Sema::ParseField(): Unknown TagDecl"); + assert(0 && "Sema::ActOnField(): Unknown TagDecl"); if (D.getInvalidType() || InvalidDecl) NewFD->setInvalidDecl(); @@ -1080,9 +1080,9 @@ static void ObjcSetIvarVisibility(ObjcIvarDecl *OIvar, } } -void Sema::ProcessFieldDecls(SourceLocation RecLoc, DeclTy *RecDecl, - DeclTy **Fields, unsigned NumFields, - tok::ObjCKeywordKind *visibility) { +void Sema::ActOnFields(SourceLocation RecLoc, DeclTy *RecDecl, + DeclTy **Fields, unsigned NumFields, + tok::ObjCKeywordKind *visibility) { Decl *EnclosingDecl = static_cast(RecDecl); assert(EnclosingDecl && "missing record or interface decl"); RecordDecl *Record = dyn_cast(EnclosingDecl); @@ -1276,7 +1276,7 @@ Sema::DeclTy *Sema::ObjcBuildMethodDeclaration(SourceLocation MethodLoc, AttrList, MethodType == tok::minus); } -Sema::DeclTy *Sema::ParseEnumConstant(Scope *S, DeclTy *theEnumDecl, +Sema::DeclTy *Sema::ActOnEnumConstant(Scope *S, DeclTy *theEnumDecl, DeclTy *lastEnumConst, SourceLocation IdLoc, IdentifierInfo *Id, SourceLocation EqualLoc, ExprTy *val) { @@ -1352,7 +1352,7 @@ Sema::DeclTy *Sema::ParseEnumConstant(Scope *S, DeclTy *theEnumDecl, return New; } -void Sema::ParseEnumBody(SourceLocation EnumLoc, DeclTy *EnumDeclX, +void Sema::ActOnEnumBody(SourceLocation EnumLoc, DeclTy *EnumDeclX, DeclTy **Elements, unsigned NumElements) { EnumDecl *Enum = cast(static_cast(EnumDeclX)); assert(!Enum->isDefinition() && "Enum redefinitions can't reach here"); diff --git a/clang/Sema/SemaExpr.cpp b/clang/Sema/SemaExpr.cpp index d2d1f9567c24..bc107451d69c 100644 --- a/clang/Sema/SemaExpr.cpp +++ b/clang/Sema/SemaExpr.cpp @@ -53,10 +53,10 @@ Sema::ParseStringLiteral(const Token *StringToks, unsigned NumStringToks) { } -/// ParseIdentifierExpr - The parser read an identifier in expression context, +/// ActOnIdentifierExpr - The parser read an identifier in expression context, /// validate it per-C99 6.5.1. HasTrailingLParen indicates whether this /// identifier is used in an function call context. -Sema::ExprResult Sema::ParseIdentifierExpr(Scope *S, SourceLocation Loc, +Sema::ExprResult Sema::ActOnIdentifierExpr(Scope *S, SourceLocation Loc, IdentifierInfo &II, bool HasTrailingLParen) { // Could be enum-constant or decl. @@ -646,7 +646,7 @@ ParseInitList(SourceLocation LBraceLoc, ExprTy **initlist, unsigned NumInit, SourceLocation RBraceLoc) { Expr **InitList = reinterpret_cast(initlist); - // Semantic analysis for initializers is done by ParseDeclarator() and + // Semantic analysis for initializers is done by ActOnDeclarator() and // CheckInitializer() - it requires knowledge of the object being intialized. InitListExpr *e = new InitListExpr(LBraceLoc, InitList, NumInit, RBraceLoc); @@ -1031,7 +1031,7 @@ Sema::AssignmentCheckResult Sema::CheckSingleAssignmentConstraints(QualType lhsType, Expr *&rExpr) { // This check seems unnatural, however it is necessary to insure the proper // conversion of functions/arrays. If the conversion were done for all - // DeclExpr's (created by ParseIdentifierExpr), it would mess up the unary + // DeclExpr's (created by ActOnIdentifierExpr), it would mess up the unary // expressions that surpress this implicit conversion (&, sizeof). DefaultFunctionArrayConversion(rExpr); diff --git a/clang/Sema/SemaType.cpp b/clang/Sema/SemaType.cpp index bf8d48b553d7..5340928a1923 100644 --- a/clang/Sema/SemaType.cpp +++ b/clang/Sema/SemaType.cpp @@ -318,7 +318,7 @@ QualType Sema::GetTypeForDeclarator(Declarator &D, Scope *S) { return T; } -Sema::TypeResult Sema::ParseTypeName(Scope *S, Declarator &D) { +Sema::TypeResult Sema::ActOnTypeName(Scope *S, Declarator &D) { // C99 6.7.6: Type names have no identifier. This is already validated by // the parser. assert(D.getIdentifier() == 0 && "Type name should have no identifier!"); @@ -334,7 +334,7 @@ Sema::TypeResult Sema::ParseTypeName(Scope *S, Declarator &D) { } // Called from Parser::ParseParenDeclarator(). -Sema::TypeResult Sema::ParseParamDeclaratorType(Scope *S, Declarator &D) { +Sema::TypeResult Sema::ActOnParamDeclaratorType(Scope *S, Declarator &D) { // Note: parameters have identifiers, but we don't care about them here, we // just want the type converted. QualType T = GetTypeForDeclarator(D, S); diff --git a/clang/clang.xcodeproj/project.pbxproj b/clang/clang.xcodeproj/project.pbxproj index 2386765c2660..52139a3bdafc 100644 --- a/clang/clang.xcodeproj/project.pbxproj +++ b/clang/clang.xcodeproj/project.pbxproj @@ -686,7 +686,6 @@ 08FB7793FE84155DC02AAC07 /* Project object */ = { isa = PBXProject; buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "clang" */; - compatibilityVersion = "Xcode 2.4"; hasScannedForEncodings = 1; mainGroup = 08FB7794FE84155DC02AAC07 /* clang */; projectDirPath = ""; diff --git a/clang/include/clang/AST/Decl.h b/clang/include/clang/AST/Decl.h index b8a9e56941c7..c47aec3596be 100644 --- a/clang/include/clang/AST/Decl.h +++ b/clang/include/clang/AST/Decl.h @@ -317,7 +317,7 @@ private: }; -/// FieldDecl - An instance of this class is created by Sema::ParseField to +/// FieldDecl - An instance of this class is created by Sema::ActOnField to /// represent a member of a struct/union/class. class FieldDecl : public Decl { /// Identifier - The identifier for this declaration (e.g. the name for the diff --git a/clang/include/clang/Parse/Action.h b/clang/include/clang/Parse/Action.h index 141261b7cd2f..014c7818e3d7 100644 --- a/clang/include/clang/Parse/Action.h +++ b/clang/include/clang/Parse/Action.h @@ -93,14 +93,14 @@ public: /// in the current scope. virtual DeclTy *isTypeName(const IdentifierInfo &II, Scope *S) const = 0; - /// ParseDeclarator - This callback is invoked when a declarator is parsed and + /// ActOnDeclarator - This callback is invoked when a declarator is parsed and /// 'Init' specifies the initializer if any. This is for things like: /// "int X = 4" or "typedef int foo". /// /// LastInGroup is non-null for cases where one declspec has multiple - /// declarators on it. For example in 'int A, B', ParseDeclarator will be + /// declarators on it. For example in 'int A, B', ActOnDeclarator will be /// called with LastInGroup=A when invoked for B. - virtual DeclTy *ParseDeclarator(Scope *S, Declarator &D,DeclTy *LastInGroup) { + virtual DeclTy *ActOnDeclarator(Scope *S, Declarator &D,DeclTy *LastInGroup) { return 0; } @@ -108,7 +108,7 @@ public: /// ParseDeclarator (when an initializer is present). The code is factored /// this way to make sure we are able to handle the following: /// void func() { int xx = xx; } - /// This allows ParseDeclarator to register "xx" prior to parsing the + /// This allows ActOnDeclarator to register "xx" prior to parsing the /// initializer. The declaration above should still result in a warning, /// since the reference to "xx" is uninitialized. virtual void AddInitializerToDecl(DeclTy *Dcl, ExprTy *Init) { @@ -121,11 +121,11 @@ public: } /// ParseStartOfFunctionDef - This is called at the start of a function - /// definition, instead of calling ParseDeclarator. The Declarator includes + /// definition, instead of calling ActOnDeclarator. The Declarator includes /// information about formal arguments that are part of this function. virtual DeclTy *ParseStartOfFunctionDef(Scope *FnBodyScope, Declarator &D) { - // Default to ParseDeclarator. - return ParseDeclarator(FnBodyScope, D, 0); + // Default to ActOnDeclarator. + return ActOnDeclarator(FnBodyScope, D, 0); } /// ParseFunctionDefBody - This is called when a function body has completed @@ -155,11 +155,11 @@ public: // Type Parsing Callbacks. //===--------------------------------------------------------------------===// - virtual TypeResult ParseTypeName(Scope *S, Declarator &D) { + virtual TypeResult ActOnTypeName(Scope *S, Declarator &D) { return 0; } - virtual TypeResult ParseParamDeclaratorType(Scope *S, Declarator &D) { + virtual TypeResult ActOnParamDeclaratorType(Scope *S, Declarator &D) { return 0; } @@ -168,7 +168,7 @@ public: TK_Declaration, // Fwd decl of a tag: 'struct foo;' TK_Definition // Definition of a tag: 'struct foo { int X; } Y;' }; - virtual DeclTy *ParseTag(Scope *S, unsigned TagType, TagKind TK, + virtual DeclTy *ActOnTag(Scope *S, unsigned TagType, TagKind TK, SourceLocation KWLoc, IdentifierInfo *Name, SourceLocation NameLoc, AttributeList *Attr) { // TagType is an instance of DeclSpec::TST, indicating what kind of tag this @@ -176,20 +176,20 @@ public: return 0; } - virtual DeclTy *ParseField(Scope *S, DeclTy *TagDecl,SourceLocation DeclStart, + virtual DeclTy *ActOnField(Scope *S, DeclTy *TagDecl,SourceLocation DeclStart, Declarator &D, ExprTy *BitfieldWidth) { return 0; } - virtual void ProcessFieldDecls(SourceLocation RecLoc, DeclTy *TagDecl, + virtual void ActOnFields(SourceLocation RecLoc, DeclTy *TagDecl, DeclTy **Fields, unsigned NumFields, tok::ObjCKeywordKind *visibility = 0) {} - virtual DeclTy *ParseEnumConstant(Scope *S, DeclTy *EnumDecl, + virtual DeclTy *ActOnEnumConstant(Scope *S, DeclTy *EnumDecl, DeclTy *LastEnumConstant, SourceLocation IdLoc, IdentifierInfo *Id, SourceLocation EqualLoc, ExprTy *Val) { return 0; } - virtual void ParseEnumBody(SourceLocation EnumLoc, DeclTy *EnumDecl, + virtual void ActOnEnumBody(SourceLocation EnumLoc, DeclTy *EnumDecl, DeclTy **Elements, unsigned NumElements) {} //===--------------------------------------------------------------------===// @@ -288,10 +288,10 @@ public: // Primary Expressions. - /// ParseIdentifierExpr - Parse an identifier in expression context. + /// ActOnIdentifierExpr - Parse an identifier in expression context. /// 'HasTrailingLParen' indicates whether or not the identifier has a '(' /// token immediately after it. - virtual ExprResult ParseIdentifierExpr(Scope *S, SourceLocation Loc, + virtual ExprResult ActOnIdentifierExpr(Scope *S, SourceLocation Loc, IdentifierInfo &II, bool HasTrailingLParen) { return 0; @@ -497,10 +497,10 @@ public: /// determine whether the name is a typedef or not in this scope. virtual DeclTy *isTypeName(const IdentifierInfo &II, Scope *S) const; - /// ParseDeclarator - If this is a typedef declarator, we modify the + /// ActOnDeclarator - If this is a typedef declarator, we modify the /// IdentifierInfo::FETokenInfo field to keep track of this fact, until S is /// popped. - virtual DeclTy *ParseDeclarator(Scope *S, Declarator &D, DeclTy *LastInGroup); + virtual DeclTy *ActOnDeclarator(Scope *S, Declarator &D, DeclTy *LastInGroup); /// PopScope - When a scope is popped, if any typedefs are now out-of-scope, /// they are removed from the IdentifierInfo::FETokenInfo field. diff --git a/clang/include/clang/Parse/AttributeList.h b/clang/include/clang/Parse/AttributeList.h index 8bde7d08fd00..d4a94b6c5269 100644 --- a/clang/include/clang/Parse/AttributeList.h +++ b/clang/include/clang/Parse/AttributeList.h @@ -44,7 +44,7 @@ public: // FIXME: before we delete the vector, we need to make sure the Expr's // have been deleted. Since Action::ExprTy is "void", we are dependent // on the actions module for actually freeing the memory. The specific - // hooks are ParseDeclarator, ParseTypeName, ParseParamDeclaratorType, + // hooks are ActOnDeclarator, ActOnTypeName, ActOnParamDeclaratorType, // ParseField, ParseTag. Once these routines have freed the expression, // they should zero out the Args slot (to indicate the memory has been // freed). If any element of the vector is non-null, we should assert.