[cfe-commits] r41986 - in /cfe/trunk: Driver/PrintParserCallbacks.cpp Parse/MinimalAction.cpp Parse/ParseDecl.cpp Parse/ParseExpr.cpp Parse/ParseObjc.cpp Parse/Parser.cpp Sema/Sema.h Sema/SemaDecl.cpp Sema/SemaExpr.cpp Sema/SemaType.cpp clang.xcodeproj/project.pbxproj include/clang/AST/Decl.h include/clang/Parse/Action.h include/clang/Parse/AttributeList.h

Steve Naroff snaroff at apple.com
Sat Sep 15 11:49:25 PDT 2007


Author: snaroff
Date: Sat Sep 15 13:49:24 2007
New Revision: 41986

URL: http://llvm.org/viewvc/llvm-project?rev=41986&view=rev
Log:

Start converting Action methods from Parse-prefix to ActOn-prefix.

The previous naming scheme was confusing, since it resulted in both the Parser and Action modules having methods with the same name. In addition, the Action module never does any parsing...


Modified:
    cfe/trunk/Driver/PrintParserCallbacks.cpp
    cfe/trunk/Parse/MinimalAction.cpp
    cfe/trunk/Parse/ParseDecl.cpp
    cfe/trunk/Parse/ParseExpr.cpp
    cfe/trunk/Parse/ParseObjc.cpp
    cfe/trunk/Parse/Parser.cpp
    cfe/trunk/Sema/Sema.h
    cfe/trunk/Sema/SemaDecl.cpp
    cfe/trunk/Sema/SemaExpr.cpp
    cfe/trunk/Sema/SemaType.cpp
    cfe/trunk/clang.xcodeproj/project.pbxproj
    cfe/trunk/include/clang/AST/Decl.h
    cfe/trunk/include/clang/Parse/Action.h
    cfe/trunk/include/clang/Parse/AttributeList.h

Modified: cfe/trunk/Driver/PrintParserCallbacks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/PrintParserCallbacks.cpp?rev=41986&r1=41985&r2=41986&view=diff

==============================================================================
--- cfe/trunk/Driver/PrintParserCallbacks.cpp (original)
+++ cfe/trunk/Driver/PrintParserCallbacks.cpp Sat Sep 15 13:49:24 2007
@@ -22,12 +22,12 @@
 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 @@
       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

Modified: cfe/trunk/Parse/MinimalAction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Parse/MinimalAction.cpp?rev=41986&r1=41985&r2=41986&view=diff

==============================================================================
--- cfe/trunk/Parse/MinimalAction.cpp (original)
+++ cfe/trunk/Parse/MinimalAction.cpp Sat Sep 15 13:49:24 2007
@@ -39,11 +39,11 @@
   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.

Modified: cfe/trunk/Parse/ParseDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Parse/ParseDecl.cpp?rev=41986&r1=41985&r2=41986&view=diff

==============================================================================
--- cfe/trunk/Parse/ParseDecl.cpp (original)
+++ cfe/trunk/Parse/ParseDecl.cpp Sat Sep 15 13:49:24 2007
@@ -33,7 +33,7 @@
   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 @@
 
     // 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 @@
     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 @@
       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 @@
   
   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 @@
     }
     
     // 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 @@
   // 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 @@
       // 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();

Modified: cfe/trunk/Parse/ParseExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Parse/ParseExpr.cpp?rev=41986&r1=41985&r2=41986&view=diff

==============================================================================
--- cfe/trunk/Parse/ParseExpr.cpp (original)
+++ cfe/trunk/Parse/ParseExpr.cpp Sat Sep 15 13:49:24 2007
@@ -200,7 +200,7 @@
   //   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 @@
   //   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 @@
     // 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);

Modified: cfe/trunk/Parse/ParseObjc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Parse/ParseObjc.cpp?rev=41986&r1=41985&r2=41986&view=diff

==============================================================================
--- cfe/trunk/Parse/ParseObjc.cpp (original)
+++ cfe/trunk/Parse/ParseObjc.cpp Sat Sep 15 13:49:24 2007
@@ -659,9 +659,9 @@
     }
   }
   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;

Modified: cfe/trunk/Parse/Parser.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Parse/Parser.cpp?rev=41986&r1=41985&r2=41986&view=diff

==============================================================================
--- cfe/trunk/Parse/Parser.cpp (original)
+++ cfe/trunk/Parse/Parser.cpp Sat Sep 15 13:49:24 2007
@@ -242,7 +242,7 @@
     
     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 @@
       
       // 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.

Modified: cfe/trunk/Sema/Sema.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/Sema.h?rev=41986&r1=41985&r2=41986&view=diff

==============================================================================
--- cfe/trunk/Sema/Sema.h (original)
+++ cfe/trunk/Sema/Sema.h Sat Sep 15 13:49:24 2007
@@ -130,15 +130,15 @@
   //
   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 @@
   /// 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 @@
   // 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,

Modified: cfe/trunk/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/SemaDecl.cpp?rev=41986&r1=41985&r2=41986&view=diff

==============================================================================
--- cfe/trunk/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/Sema/SemaDecl.cpp Sat Sep 15 13:49:24 2007
@@ -430,7 +430,7 @@
 }
 
 Sema::DeclTy *
-Sema::ParseDeclarator(Scope *S, Declarator &D, DeclTy *lastDecl) {
+Sema::ActOnDeclarator(Scope *S, Declarator &D, DeclTy *lastDecl) {
   ScopedDecl *LastDeclarator = dyn_cast_or_null<ScopedDecl>((Decl *)lastDecl);
   IdentifierInfo *II = D.getIdentifier();
   
@@ -759,7 +759,7 @@
   Scope *GlobalScope = FnBodyScope->getParent();
   
   FunctionDecl *FD =
-    static_cast<FunctionDecl*>(ParseDeclarator(GlobalScope, D, 0));
+    static_cast<FunctionDecl*>(ActOnDeclarator(GlobalScope, D, 0));
   CurFunctionDecl = FD;
   
   // Create Decl objects for each parameter, adding them to the FunctionDecl.
@@ -842,7 +842,7 @@
   while (S->getParent())
     S = S->getParent();
   
-  return static_cast<Decl*>(ParseDeclarator(S, D, 0));
+  return static_cast<Decl*>(ActOnDeclarator(S, D, 0));
 }
 
 
@@ -902,11 +902,11 @@
 }
 
 
-/// 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 @@
   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 @@
   else if (isa<ObjcInterfaceDecl>(static_cast<Decl *>(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 @@
   }
 }
 
-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<Decl*>(RecDecl);
   assert(EnclosingDecl && "missing record or interface decl");
   RecordDecl *Record = dyn_cast<RecordDecl>(EnclosingDecl);
@@ -1276,7 +1276,7 @@
 			    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 @@
   return New;
 }
 
-void Sema::ParseEnumBody(SourceLocation EnumLoc, DeclTy *EnumDeclX,
+void Sema::ActOnEnumBody(SourceLocation EnumLoc, DeclTy *EnumDeclX,
                          DeclTy **Elements, unsigned NumElements) {
   EnumDecl *Enum = cast<EnumDecl>(static_cast<Decl*>(EnumDeclX));
   assert(!Enum->isDefinition() && "Enum redefinitions can't reach here");

Modified: cfe/trunk/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/SemaExpr.cpp?rev=41986&r1=41985&r2=41986&view=diff

==============================================================================
--- cfe/trunk/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/Sema/SemaExpr.cpp Sat Sep 15 13:49:24 2007
@@ -53,10 +53,10 @@
 }
 
 
-/// 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 @@
               SourceLocation RBraceLoc) {
   Expr **InitList = reinterpret_cast<Expr**>(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::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);
 

Modified: cfe/trunk/Sema/SemaType.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/SemaType.cpp?rev=41986&r1=41985&r2=41986&view=diff

==============================================================================
--- cfe/trunk/Sema/SemaType.cpp (original)
+++ cfe/trunk/Sema/SemaType.cpp Sat Sep 15 13:49:24 2007
@@ -318,7 +318,7 @@
   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 @@
 }
 
 // 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);

Modified: cfe/trunk/clang.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/clang.xcodeproj/project.pbxproj?rev=41986&r1=41985&r2=41986&view=diff

==============================================================================
--- cfe/trunk/clang.xcodeproj/project.pbxproj (original)
+++ cfe/trunk/clang.xcodeproj/project.pbxproj Sat Sep 15 13:49:24 2007
@@ -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 = "";

Modified: cfe/trunk/include/clang/AST/Decl.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Decl.h?rev=41986&r1=41985&r2=41986&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/Decl.h (original)
+++ cfe/trunk/include/clang/AST/Decl.h Sat Sep 15 13:49:24 2007
@@ -317,7 +317,7 @@
 };
 
 
-/// 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

Modified: cfe/trunk/include/clang/Parse/Action.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/Action.h?rev=41986&r1=41985&r2=41986&view=diff

==============================================================================
--- cfe/trunk/include/clang/Parse/Action.h (original)
+++ cfe/trunk/include/clang/Parse/Action.h Sat Sep 15 13:49:24 2007
@@ -93,14 +93,14 @@
   /// 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 @@
   /// 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 @@
   }
 
   /// 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 @@
   // 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 @@
     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 @@
     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 @@
   
   // 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 @@
   /// 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.

Modified: cfe/trunk/include/clang/Parse/AttributeList.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/AttributeList.h?rev=41986&r1=41985&r2=41986&view=diff

==============================================================================
--- cfe/trunk/include/clang/Parse/AttributeList.h (original)
+++ cfe/trunk/include/clang/Parse/AttributeList.h Sat Sep 15 13:49:24 2007
@@ -44,7 +44,7 @@
       // 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.





More information about the cfe-commits mailing list