[cfe-commits] r42000 - in /cfe/trunk: Parse/ParseExpr.cpp Parse/ParseExprCXX.cpp Parse/ParseStmt.cpp Sema/Sema.h Sema/SemaExpr.cpp Sema/SemaExprCXX.cpp Sema/SemaStmt.cpp include/clang/Parse/Action.h

Steve Naroff snaroff at apple.com
Sun Sep 16 07:56:36 PDT 2007


Author: snaroff
Date: Sun Sep 16 09:56:35 2007
New Revision: 42000

URL: http://llvm.org/viewvc/llvm-project?rev=42000&view=rev
Log:
Rename statement actions (from Parse-prefix to ActOn-prefix).

Modified:
    cfe/trunk/Parse/ParseExpr.cpp
    cfe/trunk/Parse/ParseExprCXX.cpp
    cfe/trunk/Parse/ParseStmt.cpp
    cfe/trunk/Sema/Sema.h
    cfe/trunk/Sema/SemaExpr.cpp
    cfe/trunk/Sema/SemaExprCXX.cpp
    cfe/trunk/Sema/SemaStmt.cpp
    cfe/trunk/include/clang/Parse/Action.h

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

==============================================================================
--- cfe/trunk/Parse/ParseExpr.cpp (original)
+++ cfe/trunk/Parse/ParseExpr.cpp Sun Sep 16 09:56:35 2007
@@ -578,7 +578,7 @@
     }
     
     Diag(AmpAmpLoc, diag::ext_gnu_address_of_label);
-    Res = Actions.ParseAddrLabel(AmpAmpLoc, Tok.getLocation(),
+    Res = Actions.ActOnAddrLabel(AmpAmpLoc, Tok.getLocation(),
                                  Tok.getIdentifierInfo());
     ConsumeToken();
     return Res;
@@ -848,7 +848,7 @@
         Comps.back().LocEnd =
           MatchRHSPunctuation(tok::r_square, Comps.back().LocStart);
       } else if (Tok.getKind() == tok::r_paren) {
-        Res = Actions.ParseBuiltinOffsetOf(StartLoc, TypeLoc, Ty, &Comps[0],
+        Res = Actions.ActOnBuiltinOffsetOf(StartLoc, TypeLoc, Ty, &Comps[0],
                                            Comps.size(), ConsumeParen());
         break;
       } else {
@@ -884,7 +884,7 @@
       Diag(Tok, diag::err_expected_rparen);
       return ExprResult(true);
     }
-    Res = Actions.ParseChooseExpr(StartLoc, Cond.Val, Expr1.Val, Expr2.Val,
+    Res = Actions.ActOnChooseExpr(StartLoc, Cond.Val, Expr1.Val, Expr2.Val,
                                   ConsumeParen());
     break;
   }
@@ -900,7 +900,7 @@
       Diag(Tok, diag::err_expected_rparen);
       return ExprResult(true);
     }
-    Res = Actions.ParseTypesCompatibleExpr(StartLoc, Ty1, Ty2, ConsumeParen());
+    Res = Actions.ActOnTypesCompatibleExpr(StartLoc, Ty1, Ty2, ConsumeParen());
     break;
   }      
   
@@ -937,7 +937,7 @@
     
     // If the substmt parsed correctly, build the AST node.
     if (!Stmt.isInvalid && Tok.getKind() == tok::r_paren)
-      Result = Actions.ParseStmtExpr(OpenLoc, Stmt.Val, Tok.getLocation());
+      Result = Actions.ActOnStmtExpr(OpenLoc, Stmt.Val, Tok.getLocation());
     
   } else if (ExprType >= CompoundLiteral && isTypeSpecifierQualifier()) {
     // Otherwise, this is a compound literal expression or cast expression.

Modified: cfe/trunk/Parse/ParseExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Parse/ParseExprCXX.cpp?rev=42000&r1=41999&r2=42000&view=diff

==============================================================================
--- cfe/trunk/Parse/ParseExprCXX.cpp (original)
+++ cfe/trunk/Parse/ParseExprCXX.cpp Sun Sep 16 09:56:35 2007
@@ -60,7 +60,7 @@
   ExprResult Result = ParseSimpleParenExpression(RParenLoc);
 
   if (!Result.isInvalid)
-    Result = Actions.ParseCXXCasts(OpLoc, Kind,
+    Result = Actions.ActOnCXXCasts(OpLoc, Kind,
                                    LAngleBracketLoc, CastTy, RAngleBracketLoc,
                                    LParenLoc, Result.Val, RParenLoc);
 
@@ -74,5 +74,5 @@
 ///         'false'
 Parser::ExprResult Parser::ParseCXXBoolLiteral() {
   tok::TokenKind Kind = Tok.getKind();
-  return Actions.ParseCXXBoolLiteral(ConsumeToken(), Kind);
+  return Actions.ActOnCXXBoolLiteral(ConsumeToken(), Kind);
 }

Modified: cfe/trunk/Parse/ParseStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Parse/ParseStmt.cpp?rev=42000&r1=41999&r2=42000&view=diff

==============================================================================
--- cfe/trunk/Parse/ParseStmt.cpp (original)
+++ cfe/trunk/Parse/ParseStmt.cpp Sun Sep 16 09:56:35 2007
@@ -84,7 +84,7 @@
 
   default:
     if (!OnlyStatement && isDeclarationSpecifier()) {
-      return Actions.ParseDeclStmt(ParseDeclaration(Declarator::BlockContext));
+      return Actions.ActOnDeclStmt(ParseDeclaration(Declarator::BlockContext));
     } else if (Tok.getKind() == tok::r_brace) {
       Diag(Tok, diag::err_expected_statement);
       return true;
@@ -100,7 +100,7 @@
       }
       // Otherwise, eat the semicolon.
       ExpectAndConsume(tok::semi, diag::err_expected_semi_after_expr);
-      return Actions.ParseExprStmt(Res.Val);
+      return Actions.ActOnExprStmt(Res.Val);
     }
     
   case tok::kw_case:                // C99 6.8.1: labeled-statement
@@ -111,7 +111,7 @@
   case tok::l_brace:                // C99 6.8.2: compound-statement
     return ParseCompoundStatement();
   case tok::semi:                   // C99 6.8.3p3: expression[opt] ';'
-    return Actions.ParseNullStmt(ConsumeToken());
+    return Actions.ActOnNullStmt(ConsumeToken());
     
   case tok::kw_if:                  // C99 6.8.4.1: if-statement
     return ParseIfStatement();
@@ -193,9 +193,9 @@
     
     // Broken substmt shouldn't prevent the label from being added to the AST.
     if (SubStmt.isInvalid)
-      SubStmt = Actions.ParseNullStmt(ColonLoc);
+      SubStmt = Actions.ActOnNullStmt(ColonLoc);
     
-    return Actions.ParseLabelStmt(IdentTok.getLocation(), 
+    return Actions.ActOnLabelStmt(IdentTok.getLocation(), 
                                   IdentTok.getIdentifierInfo(),
                                   ColonLoc, SubStmt.Val);
   }
@@ -233,7 +233,7 @@
     ParseDeclarator(DeclaratorInfo);
     
     DeclTy *Decl = ParseInitDeclaratorListAfterFirstDeclarator(DeclaratorInfo);
-    return Decl ? Actions.ParseDeclStmt(Decl) : 0;
+    return Decl ? Actions.ActOnDeclStmt(Decl) : 0;
   }
   
   // Otherwise, this is an expression.  Seed it with II and parse it.
@@ -248,7 +248,7 @@
   } else {
     ConsumeToken();
     // Convert expr to a stmt.
-    return Actions.ParseExprStmt(Res.Val);
+    return Actions.ActOnExprStmt(Res.Val);
   }
 }
 
@@ -302,9 +302,9 @@
 
   // Broken substmt shouldn't prevent the case from being added to the AST.
   if (SubStmt.isInvalid)
-    SubStmt = Actions.ParseNullStmt(ColonLoc);
+    SubStmt = Actions.ActOnNullStmt(ColonLoc);
   
-  return Actions.ParseCaseStmt(CaseLoc, LHS.Val, DotDotDotLoc, RHSVal, ColonLoc,
+  return Actions.ActOnCaseStmt(CaseLoc, LHS.Val, DotDotDotLoc, RHSVal, ColonLoc,
                                SubStmt.Val);
 }
 
@@ -335,7 +335,7 @@
   if (SubStmt.isInvalid)
     return true;
   
-  return Actions.ParseDefaultStmt(DefaultLoc, ColonLoc, SubStmt.Val, CurScope);
+  return Actions.ActOnDefaultStmt(DefaultLoc, ColonLoc, SubStmt.Val, CurScope);
 }
 
 
@@ -382,7 +382,7 @@
 
 
 /// ParseCompoundStatementBody - Parse a sequence of statements and invoke the
-/// ParseCompoundStmt action.  This expects the '{' to be the current token, and
+/// ActOnCompoundStmt action.  This expects the '{' to be the current token, and
 /// consume the '}' at the end of the block.  It does not manipulate the scope
 /// stack.
 Parser::StmtResult Parser::ParseCompoundStatementBody(bool isStmtExpr) {
@@ -408,7 +408,7 @@
       if (isDeclarationSpecifier()) {
         // FIXME: Save the __extension__ on the decl as a node somehow.
         // FIXME: disable extwarns.
-        R = Actions.ParseDeclStmt(ParseDeclaration(Declarator::BlockContext));
+        R = Actions.ActOnDeclStmt(ParseDeclaration(Declarator::BlockContext));
       } else {
         // Otherwise this was a unary __extension__ marker.  Parse the
         // subexpression and add the __extension__ unary op. 
@@ -426,7 +426,7 @@
         
         // Eat the semicolon at the end of stmt and convert the expr into a stmt.
         ExpectAndConsume(tok::semi, diag::err_expected_semi_after_expr);
-        R = Actions.ParseExprStmt(Res.Val);
+        R = Actions.ActOnExprStmt(Res.Val);
       }
     }
     
@@ -441,7 +441,7 @@
   }
   
   SourceLocation RBraceLoc = ConsumeBrace();
-  return Actions.ParseCompoundStmt(LBraceLoc, RBraceLoc,
+  return Actions.ActOnCompoundStmt(LBraceLoc, RBraceLoc,
                                    &Stmts[0], Stmts.size(), isStmtExpr);
 }
 
@@ -485,7 +485,7 @@
 
   // Broken substmt shouldn't prevent the label from being added to the AST.
   if (CondStmt.isInvalid)
-    CondStmt = Actions.ParseNullStmt(Tok.getLocation());
+    CondStmt = Actions.ActOnNullStmt(Tok.getLocation());
   
   // Pop the 'if' scope if needed.
   if (NeedsInnerScope) ExitScope();
@@ -509,13 +509,13 @@
     if (NeedsInnerScope) ExitScope();
     
     if (ElseStmt.isInvalid)
-      ElseStmt = Actions.ParseNullStmt(ElseLoc);
+      ElseStmt = Actions.ActOnNullStmt(ElseLoc);
   }
   
   if (getLang().C99)
     ExitScope();
 
-  return Actions.ParseIfStmt(IfLoc, CondExp.Val, CondStmt.Val,
+  return Actions.ActOnIfStmt(IfLoc, CondExp.Val, CondStmt.Val,
                              ElseLoc, ElseStmt.Val);
 }
 
@@ -547,7 +547,7 @@
     return true;
   }
     
-  StmtResult Switch = Actions.StartSwitchStmt(Cond.Val);
+  StmtResult Switch = Actions.ActOnStartOfSwitchStmt(Cond.Val);
   
   // C99 6.8.4p3 - In C99, the body of the switch statement is a scope, even if
   // there is no compound stmt.  C90 does not have this clause.  We only do this
@@ -562,13 +562,13 @@
   if (NeedsInnerScope) ExitScope();
   
   if (Body.isInvalid) {
-    Body = Actions.ParseNullStmt(Tok.getLocation());
+    Body = Actions.ActOnNullStmt(Tok.getLocation());
     // FIXME: Remove the case statement list from the Switch statement.
   }
   
   ExitScope();
   
-  return Actions.FinishSwitchStmt(SwitchLoc, Switch.Val, Body.Val);
+  return Actions.ActOnFinishSwitchStmt(SwitchLoc, Switch.Val, Body.Val);
 }
 
 /// ParseWhileStatement
@@ -611,7 +611,7 @@
   
   if (Cond.isInvalid || Body.isInvalid) return true;
   
-  return Actions.ParseWhileStmt(WhileLoc, Cond.Val, Body.Val);
+  return Actions.ActOnWhileStmt(WhileLoc, Cond.Val, Body.Val);
 }
 
 /// ParseDoStatement
@@ -664,7 +664,7 @@
   
   if (Cond.isInvalid || Body.isInvalid) return true;
   
-  return Actions.ParseDoStmt(DoLoc, Body.Val, WhileLoc, Cond.Val);
+  return Actions.ActOnDoStmt(DoLoc, Body.Val, WhileLoc, Cond.Val);
 }
 
 /// ParseForStatement
@@ -704,14 +704,14 @@
     if (!getLang().C99)   // Use of C99-style for loops in C90 mode?
       Diag(Tok, diag::ext_c99_variable_decl_in_for_loop);
     DeclTy *aBlockVarDecl = ParseDeclaration(Declarator::ForContext);
-    StmtResult stmtResult = Actions.ParseDeclStmt(aBlockVarDecl);
+    StmtResult stmtResult = Actions.ActOnDeclStmt(aBlockVarDecl);
     FirstPart = stmtResult.isInvalid ? 0 : stmtResult.Val;
   } else {
     Value = ParseExpression();
 
     // Turn the expression into a stmt.
     if (!Value.isInvalid) {
-      StmtResult R = Actions.ParseExprStmt(Value.Val);
+      StmtResult R = Actions.ActOnExprStmt(Value.Val);
       if (!R.isInvalid)
         FirstPart = R.Val;
     }
@@ -749,7 +749,7 @@
     Value = ParseExpression();
     if (!Value.isInvalid) {
       // Turn the expression into a stmt.
-      StmtResult R = Actions.ParseExprStmt(Value.Val);
+      StmtResult R = Actions.ActOnExprStmt(Value.Val);
       if (!R.isInvalid)
         ThirdPart = R.Val;
     }
@@ -776,7 +776,7 @@
   if (Body.isInvalid)
     return Body;
   
-  return Actions.ParseForStmt(ForLoc, LParenLoc, FirstPart, SecondPart,
+  return Actions.ActOnForStmt(ForLoc, LParenLoc, FirstPart, SecondPart,
                               ThirdPart, RParenLoc, Body.Val);
 }
 
@@ -793,7 +793,7 @@
   
   StmtResult Res;
   if (Tok.getKind() == tok::identifier) {
-    Res = Actions.ParseGotoStmt(GotoLoc, Tok.getLocation(),
+    Res = Actions.ActOnGotoStmt(GotoLoc, Tok.getLocation(),
                                 Tok.getIdentifierInfo());
     ConsumeToken();
   } else if (Tok.getKind() == tok::star && !getLang().NoExtensions) {
@@ -805,7 +805,7 @@
       SkipUntil(tok::semi, false, true);
       return true;
     }
-    Res = Actions.ParseIndirectGotoStmt(GotoLoc, StarLoc, R.Val);
+    Res = Actions.ActOnIndirectGotoStmt(GotoLoc, StarLoc, R.Val);
   } else {
     Diag(Tok, diag::err_expected_ident);
     return true;
@@ -822,7 +822,7 @@
 ///
 Parser::StmtResult Parser::ParseContinueStatement() {
   SourceLocation ContinueLoc = ConsumeToken();  // eat the 'continue'.
-  return Actions.ParseContinueStmt(ContinueLoc, CurScope);
+  return Actions.ActOnContinueStmt(ContinueLoc, CurScope);
 }
 
 /// ParseBreakStatement
@@ -833,7 +833,7 @@
 ///
 Parser::StmtResult Parser::ParseBreakStatement() {
   SourceLocation BreakLoc = ConsumeToken();  // eat the 'break'.
-  return Actions.ParseBreakStmt(BreakLoc, CurScope);
+  return Actions.ActOnBreakStmt(BreakLoc, CurScope);
 }
 
 /// ParseReturnStatement
@@ -851,7 +851,7 @@
       return true;
     }
   }
-  return Actions.ParseReturnStmt(ReturnLoc, R.Val);
+  return Actions.ActOnReturnStmt(ReturnLoc, R.Val);
 }
 
 /// ParseAsmStatement - Parse a GNU extended asm statement.

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

==============================================================================
--- cfe/trunk/Sema/Sema.h (original)
+++ cfe/trunk/Sema/Sema.h Sun Sep 16 09:56:35 2007
@@ -203,47 +203,47 @@
   //===--------------------------------------------------------------------===//
   // Statement Parsing Callbacks: SemaStmt.cpp.
 public:
-  virtual StmtResult ParseExprStmt(ExprTy *Expr);
+  virtual StmtResult ActOnExprStmt(ExprTy *Expr);
   
-  virtual StmtResult ParseNullStmt(SourceLocation SemiLoc);
-  virtual StmtResult ParseCompoundStmt(SourceLocation L, SourceLocation R,
+  virtual StmtResult ActOnNullStmt(SourceLocation SemiLoc);
+  virtual StmtResult ActOnCompoundStmt(SourceLocation L, SourceLocation R,
                                        StmtTy **Elts, unsigned NumElts,
                                        bool isStmtExpr);
-  virtual StmtResult ParseDeclStmt(DeclTy *Decl);
-  virtual StmtResult ParseCaseStmt(SourceLocation CaseLoc, ExprTy *LHSVal,
+  virtual StmtResult ActOnDeclStmt(DeclTy *Decl);
+  virtual StmtResult ActOnCaseStmt(SourceLocation CaseLoc, ExprTy *LHSVal,
                                    SourceLocation DotDotDotLoc, ExprTy *RHSVal,
                                    SourceLocation ColonLoc, StmtTy *SubStmt);
-  virtual StmtResult ParseDefaultStmt(SourceLocation DefaultLoc,
+  virtual StmtResult ActOnDefaultStmt(SourceLocation DefaultLoc,
                                       SourceLocation ColonLoc, StmtTy *SubStmt,
                                       Scope *CurScope);
-  virtual StmtResult ParseLabelStmt(SourceLocation IdentLoc, IdentifierInfo *II,
+  virtual StmtResult ActOnLabelStmt(SourceLocation IdentLoc, IdentifierInfo *II,
                                     SourceLocation ColonLoc, StmtTy *SubStmt);
-  virtual StmtResult ParseIfStmt(SourceLocation IfLoc, ExprTy *CondVal,
+  virtual StmtResult ActOnIfStmt(SourceLocation IfLoc, ExprTy *CondVal,
                                  StmtTy *ThenVal, SourceLocation ElseLoc,
                                  StmtTy *ElseVal);
-  virtual StmtResult StartSwitchStmt(ExprTy *Cond);
-  virtual StmtResult FinishSwitchStmt(SourceLocation SwitchLoc, StmtTy *Switch, 
+  virtual StmtResult ActOnStartOfSwitchStmt(ExprTy *Cond);
+  virtual StmtResult ActOnFinishSwitchStmt(SourceLocation SwitchLoc, StmtTy *Switch, 
                                       ExprTy *Body);
-  virtual StmtResult ParseWhileStmt(SourceLocation WhileLoc, ExprTy *Cond,
+  virtual StmtResult ActOnWhileStmt(SourceLocation WhileLoc, ExprTy *Cond,
                                     StmtTy *Body);
-  virtual StmtResult ParseDoStmt(SourceLocation DoLoc, StmtTy *Body,
+  virtual StmtResult ActOnDoStmt(SourceLocation DoLoc, StmtTy *Body,
                                  SourceLocation WhileLoc, ExprTy *Cond);
   
-  virtual StmtResult ParseForStmt(SourceLocation ForLoc, 
+  virtual StmtResult ActOnForStmt(SourceLocation ForLoc, 
                                   SourceLocation LParenLoc, 
                                   StmtTy *First, ExprTy *Second, ExprTy *Third,
                                   SourceLocation RParenLoc, StmtTy *Body);
-  virtual StmtResult ParseGotoStmt(SourceLocation GotoLoc,
+  virtual StmtResult ActOnGotoStmt(SourceLocation GotoLoc,
                                    SourceLocation LabelLoc,
                                    IdentifierInfo *LabelII);
-  virtual StmtResult ParseIndirectGotoStmt(SourceLocation GotoLoc,
+  virtual StmtResult ActOnIndirectGotoStmt(SourceLocation GotoLoc,
                                            SourceLocation StarLoc,
                                            ExprTy *DestExp);
-  virtual StmtResult ParseContinueStmt(SourceLocation ContinueLoc,
+  virtual StmtResult ActOnContinueStmt(SourceLocation ContinueLoc,
                                        Scope *CurScope);
-  virtual StmtResult ParseBreakStmt(SourceLocation GotoLoc, Scope *CurScope);
+  virtual StmtResult ActOnBreakStmt(SourceLocation GotoLoc, Scope *CurScope);
   
-  virtual StmtResult ParseReturnStmt(SourceLocation ReturnLoc,
+  virtual StmtResult ActOnReturnStmt(SourceLocation ReturnLoc,
                                      ExprTy *RetValExp);
   
   //===--------------------------------------------------------------------===//
@@ -309,39 +309,39 @@
                                         SourceLocation ColonLoc,
                                         ExprTy *Cond, ExprTy *LHS, ExprTy *RHS);
 
-  /// ParseAddrLabel - Parse the GNU address of label extension: "&&foo".
-  virtual ExprResult ParseAddrLabel(SourceLocation OpLoc, SourceLocation LabLoc,
+  /// ActOnAddrLabel - Parse the GNU address of label extension: "&&foo".
+  virtual ExprResult ActOnAddrLabel(SourceLocation OpLoc, SourceLocation LabLoc,
                                     IdentifierInfo *LabelII);
   
-  virtual ExprResult ParseStmtExpr(SourceLocation LPLoc, StmtTy *SubStmt,
+  virtual ExprResult ActOnStmtExpr(SourceLocation LPLoc, StmtTy *SubStmt,
                                    SourceLocation RPLoc); // "({..})"
 
   /// __builtin_offsetof(type, a.b[123][456].c)
-  virtual ExprResult ParseBuiltinOffsetOf(SourceLocation BuiltinLoc,
+  virtual ExprResult ActOnBuiltinOffsetOf(SourceLocation BuiltinLoc,
                                           SourceLocation TypeLoc, TypeTy *Arg1,
                                           OffsetOfComponent *CompPtr,
                                           unsigned NumComponents,
                                           SourceLocation RParenLoc);
     
   // __builtin_types_compatible_p(type1, type2)
-  virtual ExprResult ParseTypesCompatibleExpr(SourceLocation BuiltinLoc, 
+  virtual ExprResult ActOnTypesCompatibleExpr(SourceLocation BuiltinLoc, 
                                               TypeTy *arg1, TypeTy *arg2,
                                               SourceLocation RPLoc);
                                               
   // __builtin_choose_expr(constExpr, expr1, expr2)
-  virtual ExprResult ParseChooseExpr(SourceLocation BuiltinLoc, 
+  virtual ExprResult ActOnChooseExpr(SourceLocation BuiltinLoc, 
                                      ExprTy *cond, ExprTy *expr1, ExprTy *expr2,
                                      SourceLocation RPLoc);
   
-  /// ParseCXXCasts - Parse {dynamic,static,reinterpret,const}_cast's.
-  virtual ExprResult ParseCXXCasts(SourceLocation OpLoc, tok::TokenKind Kind,
+  /// ActOnCXXCasts - Parse {dynamic,static,reinterpret,const}_cast's.
+  virtual ExprResult ActOnCXXCasts(SourceLocation OpLoc, tok::TokenKind Kind,
                                    SourceLocation LAngleBracketLoc, TypeTy *Ty,
                                    SourceLocation RAngleBracketLoc,
                                    SourceLocation LParenLoc, ExprTy *E,
                                    SourceLocation RParenLoc);
 
-  /// ParseCXXBoolLiteral - Parse {true,false} literals.
-  virtual ExprResult ParseCXXBoolLiteral(SourceLocation OpLoc,
+  /// ActOnCXXBoolLiteral - Parse {true,false} literals.
+  virtual ExprResult ActOnCXXBoolLiteral(SourceLocation OpLoc,
                                          tok::TokenKind Kind);
   
   // ParseObjCStringLiteral - Parse Objective-C string literals.
@@ -406,7 +406,7 @@
   AssignmentCheckResult CheckAssignmentConstraints(QualType lhs, QualType rhs);
   
   // CheckSingleAssignmentConstraints - Currently used by ActOnCallExpr,
-  // CheckAssignmentOperands, and ParseReturnStmt. Prior to type checking, 
+  // CheckAssignmentOperands, and ActOnReturnStmt. Prior to type checking, 
   // this routine performs the default function/array converions.
   AssignmentCheckResult CheckSingleAssignmentConstraints(QualType lhs, 
                                                          Expr *&rExpr);

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

==============================================================================
--- cfe/trunk/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/Sema/SemaExpr.cpp Sun Sep 16 09:56:35 2007
@@ -1685,8 +1685,8 @@
   return new UnaryOperator(Input, Opc, resultType, OpLoc);
 }
 
-/// ParseAddrLabel - Parse the GNU address of label extension: "&&foo".
-Sema::ExprResult Sema::ParseAddrLabel(SourceLocation OpLoc, 
+/// ActOnAddrLabel - Parse the GNU address of label extension: "&&foo".
+Sema::ExprResult Sema::ActOnAddrLabel(SourceLocation OpLoc, 
                                       SourceLocation LabLoc,
                                       IdentifierInfo *LabelII) {
   // Look up the record for this label identifier.
@@ -1701,7 +1701,7 @@
                            Context.getPointerType(Context.VoidTy));
 }
 
-Sema::ExprResult Sema::ParseStmtExpr(SourceLocation LPLoc, StmtTy *substmt,
+Sema::ExprResult Sema::ActOnStmtExpr(SourceLocation LPLoc, StmtTy *substmt,
                                      SourceLocation RPLoc) { // "({..})"
   Stmt *SubStmt = static_cast<Stmt*>(substmt);
   assert(SubStmt && isa<CompoundStmt>(SubStmt) && "Invalid action invocation!");
@@ -1725,7 +1725,7 @@
   return new StmtExpr(Compound, Ty, LPLoc, RPLoc);
 }
 
-Sema::ExprResult Sema::ParseBuiltinOffsetOf(SourceLocation BuiltinLoc,
+Sema::ExprResult Sema::ActOnBuiltinOffsetOf(SourceLocation BuiltinLoc,
                                             SourceLocation TypeLoc,
                                             TypeTy *argty,
                                             OffsetOfComponent *CompPtr,
@@ -1799,7 +1799,7 @@
 }
 
 
-Sema::ExprResult Sema::ParseTypesCompatibleExpr(SourceLocation BuiltinLoc, 
+Sema::ExprResult Sema::ActOnTypesCompatibleExpr(SourceLocation BuiltinLoc, 
                                                 TypeTy *arg1, TypeTy *arg2,
                                                 SourceLocation RPLoc) {
   QualType argT1 = QualType::getFromOpaquePtr(arg1);
@@ -1810,7 +1810,7 @@
   return new TypesCompatibleExpr(Context.IntTy, BuiltinLoc, argT1, argT2,RPLoc);
 }
 
-Sema::ExprResult Sema::ParseChooseExpr(SourceLocation BuiltinLoc, ExprTy *cond, 
+Sema::ExprResult Sema::ActOnChooseExpr(SourceLocation BuiltinLoc, ExprTy *cond, 
                                        ExprTy *expr1, ExprTy *expr2,
                                        SourceLocation RPLoc) {
   Expr *CondExpr = static_cast<Expr*>(cond);

Modified: cfe/trunk/Sema/SemaExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/SemaExprCXX.cpp?rev=42000&r1=41999&r2=42000&view=diff

==============================================================================
--- cfe/trunk/Sema/SemaExprCXX.cpp (original)
+++ cfe/trunk/Sema/SemaExprCXX.cpp Sun Sep 16 09:56:35 2007
@@ -16,9 +16,9 @@
 #include "clang/AST/ASTContext.h"
 using namespace clang;
 
-/// ParseCXXCasts - Parse {dynamic,static,reinterpret,const}_cast's.
+/// ActOnCXXCasts - Parse {dynamic,static,reinterpret,const}_cast's.
 Action::ExprResult
-Sema::ParseCXXCasts(SourceLocation OpLoc, tok::TokenKind Kind,
+Sema::ActOnCXXCasts(SourceLocation OpLoc, tok::TokenKind Kind,
                     SourceLocation LAngleBracketLoc, TypeTy *Ty,
                     SourceLocation RAngleBracketLoc,
                     SourceLocation LParenLoc, ExprTy *E,
@@ -36,9 +36,9 @@
   return new CXXCastExpr(Op, QualType::getFromOpaquePtr(Ty), (Expr*)E, OpLoc);
 }
 
-/// ParseCXXBoolLiteral - Parse {true,false} literals.
+/// ActOnCXXBoolLiteral - Parse {true,false} literals.
 Action::ExprResult
-Sema::ParseCXXBoolLiteral(SourceLocation OpLoc, tok::TokenKind Kind) {
+Sema::ActOnCXXBoolLiteral(SourceLocation OpLoc, tok::TokenKind Kind) {
   assert((Kind != tok::kw_true || Kind != tok::kw_false) &&
          "Unknown C++ Boolean value!");
   return new CXXBoolLiteralExpr(Kind == tok::kw_true, Context.BoolTy, OpLoc);

Modified: cfe/trunk/Sema/SemaStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/SemaStmt.cpp?rev=42000&r1=41999&r2=42000&view=diff

==============================================================================
--- cfe/trunk/Sema/SemaStmt.cpp (original)
+++ cfe/trunk/Sema/SemaStmt.cpp Sun Sep 16 09:56:35 2007
@@ -21,28 +21,28 @@
 #include "clang/Lex/IdentifierTable.h"
 using namespace clang;
 
-Sema::StmtResult Sema::ParseExprStmt(ExprTy *expr) {
+Sema::StmtResult Sema::ActOnExprStmt(ExprTy *expr) {
   Expr *E = static_cast<Expr*>(expr);
-  assert(E && "ParseExprStmt(): missing expression");
+  assert(E && "ActOnExprStmt(): missing expression");
   return E;
 }
 
 
-Sema::StmtResult Sema::ParseNullStmt(SourceLocation SemiLoc) {
+Sema::StmtResult Sema::ActOnNullStmt(SourceLocation SemiLoc) {
   return new NullStmt(SemiLoc);
 }
 
-Sema::StmtResult Sema::ParseDeclStmt(DeclTy *decl) {
+Sema::StmtResult Sema::ActOnDeclStmt(DeclTy *decl) {
   if (decl) {
     ScopedDecl *SD = dyn_cast<ScopedDecl>(static_cast<Decl *>(decl));
-    assert(SD && "Sema::ParseDeclStmt(): expected ScopedDecl");
+    assert(SD && "Sema::ActOnDeclStmt(): expected ScopedDecl");
     return new DeclStmt(SD);
   } else 
     return true; // error
 }
 
 Action::StmtResult 
-Sema::ParseCompoundStmt(SourceLocation L, SourceLocation R,
+Sema::ActOnCompoundStmt(SourceLocation L, SourceLocation R,
                         StmtTy **elts, unsigned NumElts, bool isStmtExpr) {
   Stmt **Elts = reinterpret_cast<Stmt**>(elts);
   // If we're in C89 mode, check that we don't have any decls after stmts.  If
@@ -93,7 +93,7 @@
 }
 
 Action::StmtResult
-Sema::ParseCaseStmt(SourceLocation CaseLoc, ExprTy *lhsval,
+Sema::ActOnCaseStmt(SourceLocation CaseLoc, ExprTy *lhsval,
                     SourceLocation DotDotDotLoc, ExprTy *rhsval,
                     SourceLocation ColonLoc, StmtTy *subStmt) {
   Stmt *SubStmt = static_cast<Stmt*>(subStmt);
@@ -126,7 +126,7 @@
 }
 
 Action::StmtResult
-Sema::ParseDefaultStmt(SourceLocation DefaultLoc, SourceLocation ColonLoc, 
+Sema::ActOnDefaultStmt(SourceLocation DefaultLoc, SourceLocation ColonLoc, 
                        StmtTy *subStmt, Scope *CurScope) {
   Stmt *SubStmt = static_cast<Stmt*>(subStmt);
   
@@ -142,7 +142,7 @@
 }
 
 Action::StmtResult
-Sema::ParseLabelStmt(SourceLocation IdentLoc, IdentifierInfo *II,
+Sema::ActOnLabelStmt(SourceLocation IdentLoc, IdentifierInfo *II,
                      SourceLocation ColonLoc, StmtTy *subStmt) {
   Stmt *SubStmt = static_cast<Stmt*>(subStmt);
   // Look up the record for this label identifier.
@@ -170,11 +170,11 @@
 }
 
 Action::StmtResult 
-Sema::ParseIfStmt(SourceLocation IfLoc, ExprTy *CondVal,
+Sema::ActOnIfStmt(SourceLocation IfLoc, ExprTy *CondVal,
                   StmtTy *ThenVal, SourceLocation ElseLoc,
                   StmtTy *ElseVal) {
   Expr *condExpr = (Expr *)CondVal;
-  assert(condExpr && "ParseIfStmt(): missing expression");
+  assert(condExpr && "ActOnIfStmt(): missing expression");
   
   DefaultFunctionArrayConversion(condExpr);
   QualType condType = condExpr->getType();
@@ -187,7 +187,7 @@
 }
 
 Action::StmtResult
-Sema::StartSwitchStmt(ExprTy *cond) {
+Sema::ActOnStartOfSwitchStmt(ExprTy *cond) {
   Expr *Cond = static_cast<Expr*>(cond);
   
   // C99 6.8.4.2p5 - Integer promotions are performed on the controlling expr.
@@ -260,7 +260,7 @@
 }
 
 Action::StmtResult
-Sema::FinishSwitchStmt(SourceLocation SwitchLoc, StmtTy *Switch, ExprTy *Body) {
+Sema::ActOnFinishSwitchStmt(SourceLocation SwitchLoc, StmtTy *Switch, ExprTy *Body) {
   Stmt *BodyStmt = (Stmt*)Body;
   
   SwitchStmt *SS = SwitchStack.back();
@@ -440,9 +440,9 @@
 }
 
 Action::StmtResult
-Sema::ParseWhileStmt(SourceLocation WhileLoc, ExprTy *Cond, StmtTy *Body) {
+Sema::ActOnWhileStmt(SourceLocation WhileLoc, ExprTy *Cond, StmtTy *Body) {
   Expr *condExpr = (Expr *)Cond;
-  assert(condExpr && "ParseWhileStmt(): missing expression");
+  assert(condExpr && "ActOnWhileStmt(): missing expression");
   
   DefaultFunctionArrayConversion(condExpr);
   QualType condType = condExpr->getType();
@@ -455,10 +455,10 @@
 }
 
 Action::StmtResult
-Sema::ParseDoStmt(SourceLocation DoLoc, StmtTy *Body,
+Sema::ActOnDoStmt(SourceLocation DoLoc, StmtTy *Body,
                   SourceLocation WhileLoc, ExprTy *Cond) {
   Expr *condExpr = (Expr *)Cond;
-  assert(condExpr && "ParseDoStmt(): missing expression");
+  assert(condExpr && "ActOnDoStmt(): missing expression");
   
   DefaultFunctionArrayConversion(condExpr);
   QualType condType = condExpr->getType();
@@ -471,7 +471,7 @@
 }
 
 Action::StmtResult 
-Sema::ParseForStmt(SourceLocation ForLoc, SourceLocation LParenLoc, 
+Sema::ActOnForStmt(SourceLocation ForLoc, SourceLocation LParenLoc, 
                    StmtTy *first, ExprTy *second, ExprTy *third,
                    SourceLocation RParenLoc, StmtTy *body) {
   Stmt *First  = static_cast<Stmt*>(first);
@@ -505,7 +505,7 @@
 
 
 Action::StmtResult 
-Sema::ParseGotoStmt(SourceLocation GotoLoc, SourceLocation LabelLoc,
+Sema::ActOnGotoStmt(SourceLocation GotoLoc, SourceLocation LabelLoc,
                     IdentifierInfo *LabelII) {
   // Look up the record for this label identifier.
   LabelStmt *&LabelDecl = LabelMap[LabelII];
@@ -518,7 +518,7 @@
 }
 
 Action::StmtResult 
-Sema::ParseIndirectGotoStmt(SourceLocation GotoLoc,SourceLocation StarLoc,
+Sema::ActOnIndirectGotoStmt(SourceLocation GotoLoc,SourceLocation StarLoc,
                             ExprTy *DestExp) {
   // FIXME: Verify that the operand is convertible to void*.
   
@@ -526,7 +526,7 @@
 }
 
 Action::StmtResult 
-Sema::ParseContinueStmt(SourceLocation ContinueLoc, Scope *CurScope) {
+Sema::ActOnContinueStmt(SourceLocation ContinueLoc, Scope *CurScope) {
   Scope *S = CurScope->getContinueParent();
   if (!S) {
     // C99 6.8.6.2p1: A break shall appear only in or as a loop body.
@@ -538,7 +538,7 @@
 }
 
 Action::StmtResult 
-Sema::ParseBreakStmt(SourceLocation BreakLoc, Scope *CurScope) {
+Sema::ActOnBreakStmt(SourceLocation BreakLoc, Scope *CurScope) {
   Scope *S = CurScope->getBreakParent();
   if (!S) {
     // C99 6.8.6.3p1: A break shall appear only in or as a switch/loop body.
@@ -551,7 +551,7 @@
 
 
 Action::StmtResult
-Sema::ParseReturnStmt(SourceLocation ReturnLoc, ExprTy *rex) {
+Sema::ActOnReturnStmt(SourceLocation ReturnLoc, ExprTy *rex) {
   Expr *RetValExp = static_cast<Expr *>(rex);
   QualType lhsType = CurFunctionDecl->getResultType();
 

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

==============================================================================
--- cfe/trunk/include/clang/Parse/Action.h (original)
+++ cfe/trunk/include/clang/Parse/Action.h Sun Sep 16 09:56:35 2007
@@ -196,88 +196,88 @@
   // Statement Parsing Callbacks.
   //===--------------------------------------------------------------------===//
   
-  virtual StmtResult ParseNullStmt(SourceLocation SemiLoc) {
+  virtual StmtResult ActOnNullStmt(SourceLocation SemiLoc) {
     return 0;
   }
   
-  virtual StmtResult ParseCompoundStmt(SourceLocation L, SourceLocation R,
+  virtual StmtResult ActOnCompoundStmt(SourceLocation L, SourceLocation R,
                                        StmtTy **Elts, unsigned NumElts,
                                        bool isStmtExpr) {
     return 0;
   }
-  virtual StmtResult ParseDeclStmt(DeclTy *Decl) {
+  virtual StmtResult ActOnDeclStmt(DeclTy *Decl) {
     return 0;
   }
   
-  virtual StmtResult ParseExprStmt(ExprTy *Expr) {
+  virtual StmtResult ActOnExprStmt(ExprTy *Expr) {
     return StmtResult(Expr);
   }
   
-  /// ParseCaseStmt - Note that this handles the GNU 'case 1 ... 4' extension,
+  /// ActOnCaseStmt - Note that this handles the GNU 'case 1 ... 4' extension,
   /// which can specify an RHS value.
-  virtual StmtResult ParseCaseStmt(SourceLocation CaseLoc, ExprTy *LHSVal,
+  virtual StmtResult ActOnCaseStmt(SourceLocation CaseLoc, ExprTy *LHSVal,
                                    SourceLocation DotDotDotLoc, ExprTy *RHSVal,
                                    SourceLocation ColonLoc, StmtTy *SubStmt) {
     return 0;
   }
-  virtual StmtResult ParseDefaultStmt(SourceLocation DefaultLoc,
+  virtual StmtResult ActOnDefaultStmt(SourceLocation DefaultLoc,
                                       SourceLocation ColonLoc, StmtTy *SubStmt,
                                       Scope *CurScope){
     return 0;
   }
   
-  virtual StmtResult ParseLabelStmt(SourceLocation IdentLoc, IdentifierInfo *II,
+  virtual StmtResult ActOnLabelStmt(SourceLocation IdentLoc, IdentifierInfo *II,
                                     SourceLocation ColonLoc, StmtTy *SubStmt) {
     return 0;
   }
   
-  virtual StmtResult ParseIfStmt(SourceLocation IfLoc, ExprTy *CondVal,
+  virtual StmtResult ActOnIfStmt(SourceLocation IfLoc, ExprTy *CondVal,
                                  StmtTy *ThenVal, SourceLocation ElseLoc,
                                  StmtTy *ElseVal) {
     return 0; 
   }
   
-  virtual StmtResult StartSwitchStmt(ExprTy *Cond) {
+  virtual StmtResult ActOnStartOfSwitchStmt(ExprTy *Cond) {
     return 0;
   }
   
-  virtual StmtResult FinishSwitchStmt(SourceLocation SwitchLoc, StmtTy *Switch,
-                                      ExprTy *Body) {
+  virtual StmtResult ActOnFinishSwitchStmt(SourceLocation SwitchLoc, 
+                                           StmtTy *Switch, ExprTy *Body) {
     return 0;
   }
 
-  virtual StmtResult ParseWhileStmt(SourceLocation WhileLoc, ExprTy *Cond,
+  virtual StmtResult ActOnWhileStmt(SourceLocation WhileLoc, ExprTy *Cond,
                                     StmtTy *Body) {
     return 0;
   }
-  virtual StmtResult ParseDoStmt(SourceLocation DoLoc, StmtTy *Body,
+  virtual StmtResult ActOnDoStmt(SourceLocation DoLoc, StmtTy *Body,
                                  SourceLocation WhileLoc, ExprTy *Cond) {
     return 0;
   }
-  virtual StmtResult ParseForStmt(SourceLocation ForLoc, 
+  virtual StmtResult ActOnForStmt(SourceLocation ForLoc, 
                                   SourceLocation LParenLoc, 
                                   StmtTy *First, ExprTy *Second, ExprTy *Third,
                                   SourceLocation RParenLoc, StmtTy *Body) {
     return 0;
   }
-  virtual StmtResult ParseGotoStmt(SourceLocation GotoLoc,
+  virtual StmtResult ActOnGotoStmt(SourceLocation GotoLoc,
                                    SourceLocation LabelLoc,
                                    IdentifierInfo *LabelII) {
     return 0;
   }
-  virtual StmtResult ParseIndirectGotoStmt(SourceLocation GotoLoc,
+  virtual StmtResult ActOnIndirectGotoStmt(SourceLocation GotoLoc,
                                            SourceLocation StarLoc,
                                            ExprTy *DestExp) {
     return 0;
   }
-  virtual StmtResult ParseContinueStmt(SourceLocation ContinueLoc,
+  virtual StmtResult ActOnContinueStmt(SourceLocation ContinueLoc,
                                        Scope *CurScope) {
     return 0;
   }
-  virtual StmtResult ParseBreakStmt(SourceLocation GotoLoc, Scope *CurScope) {
+  virtual StmtResult ActOnBreakStmt(SourceLocation GotoLoc, Scope *CurScope) {
     return 0;
   }
-  virtual StmtResult ParseReturnStmt(SourceLocation ReturnLoc,
+  virtual StmtResult ActOnReturnStmt(SourceLocation ReturnLoc,
                                      ExprTy *RetValExp) {
     return 0;
   }
@@ -383,12 +383,12 @@
   
   //===---------------------- GNU Extension Expressions -------------------===//
 
-  virtual ExprResult ParseAddrLabel(SourceLocation OpLoc, SourceLocation LabLoc,
+  virtual ExprResult ActOnAddrLabel(SourceLocation OpLoc, SourceLocation LabLoc,
                                     IdentifierInfo *LabelII) { // "&&foo"
     return 0;
   }
   
-  virtual ExprResult ParseStmtExpr(SourceLocation LPLoc, StmtTy *SubStmt,
+  virtual ExprResult ActOnStmtExpr(SourceLocation LPLoc, StmtTy *SubStmt,
                                    SourceLocation RPLoc) { // "({..})"
     return 0;
   }
@@ -403,7 +403,7 @@
     } U;
   };
   
-  virtual ExprResult ParseBuiltinOffsetOf(SourceLocation BuiltinLoc,
+  virtual ExprResult ActOnBuiltinOffsetOf(SourceLocation BuiltinLoc,
                                           SourceLocation TypeLoc, TypeTy *Arg1,
                                           OffsetOfComponent *CompPtr,
                                           unsigned NumComponents,
@@ -412,13 +412,13 @@
   }
   
   // __builtin_types_compatible_p(type1, type2)
-  virtual ExprResult ParseTypesCompatibleExpr(SourceLocation BuiltinLoc, 
+  virtual ExprResult ActOnTypesCompatibleExpr(SourceLocation BuiltinLoc, 
                                               TypeTy *arg1, TypeTy *arg2,
                                               SourceLocation RPLoc) {
     return 0;
   }
   // __builtin_choose_expr(constExpr, expr1, expr2)
-  virtual ExprResult ParseChooseExpr(SourceLocation BuiltinLoc, 
+  virtual ExprResult ActOnChooseExpr(SourceLocation BuiltinLoc, 
                                      ExprTy *cond, ExprTy *expr1, ExprTy *expr2,
                                      SourceLocation RPLoc) {
     return 0;
@@ -426,8 +426,8 @@
 
   //===------------------------- C++ Expressions --------------------------===//
   
-  /// ParseCXXCasts - Parse {dynamic,static,reinterpret,const}_cast's.
-  virtual ExprResult ParseCXXCasts(SourceLocation OpLoc, tok::TokenKind Kind,
+  /// ActOnCXXCasts - Parse {dynamic,static,reinterpret,const}_cast's.
+  virtual ExprResult ActOnCXXCasts(SourceLocation OpLoc, tok::TokenKind Kind,
                                    SourceLocation LAngleBracketLoc, TypeTy *Ty,
                                    SourceLocation RAngleBracketLoc,
                                    SourceLocation LParenLoc, ExprTy *Op,
@@ -435,8 +435,8 @@
     return 0;
   }
 
-  /// ParseCXXBoolLiteral - Parse {true,false} literals.
-  virtual ExprResult ParseCXXBoolLiteral(SourceLocation OpLoc,
+  /// ActOnCXXBoolLiteral - Parse {true,false} literals.
+  virtual ExprResult ActOnCXXBoolLiteral(SourceLocation OpLoc,
                                          tok::TokenKind Kind) {
     return 0;
   }





More information about the cfe-commits mailing list