[cfe-commits] r41997 - in /cfe/trunk: Parse/ParseExpr.cpp Parse/ParseInit.cpp Parse/ParseStmt.cpp Sema/Sema.h Sema/SemaExpr.cpp include/clang/Parse/Action.h

Steve Naroff snaroff at apple.com
Sat Sep 15 20:34:25 PDT 2007


Author: snaroff
Date: Sat Sep 15 22:34:24 2007
New Revision: 41997

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


Modified:
    cfe/trunk/Parse/ParseExpr.cpp
    cfe/trunk/Parse/ParseInit.cpp
    cfe/trunk/Parse/ParseStmt.cpp
    cfe/trunk/Sema/Sema.h
    cfe/trunk/Sema/SemaExpr.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=41997&r1=41996&r2=41997&view=diff

==============================================================================
--- cfe/trunk/Parse/ParseExpr.cpp (original)
+++ cfe/trunk/Parse/ParseExpr.cpp Sat Sep 15 22:34:24 2007
@@ -269,7 +269,7 @@
   if (Res.isInvalid) return Res;
 
   // Combine StarTok + Res to get the new AST for the combined expression..
-  Res = Actions.ParseUnaryOp(StarTok.getLocation(), tok::star, Res.Val);
+  Res = Actions.ActOnUnaryOp(StarTok.getLocation(), tok::star, Res.Val);
   if (Res.isInvalid) return Res;
   
   
@@ -377,10 +377,10 @@
     if (!LHS.isInvalid) {
       // Combine the LHS and RHS into the LHS (e.g. build AST).
       if (TernaryMiddle.isInvalid)
-        LHS = Actions.ParseBinOp(OpToken.getLocation(), OpToken.getKind(),
+        LHS = Actions.ActOnBinOp(OpToken.getLocation(), OpToken.getKind(),
                                  LHS.Val, RHS.Val);
       else
-        LHS = Actions.ParseConditionalOp(OpToken.getLocation(), ColonLoc,
+        LHS = Actions.ActOnConditionalOp(OpToken.getLocation(), ColonLoc,
                                          LHS.Val, TernaryMiddle.Val, RHS.Val);
     } else {
       // We had a semantic error on the LHS.  Just free the RHS and continue.
@@ -482,7 +482,7 @@
       // TODO: For cast expression with CastTy.
       Res = ParseCastExpression(false);
       if (!Res.isInvalid)
-        Res = Actions.ParseCastExpr(LParenLoc, CastTy, RParenLoc, Res.Val);
+        Res = Actions.ActOnCastExpr(LParenLoc, CastTy, RParenLoc, Res.Val);
       return Res;
     }
       
@@ -495,7 +495,7 @@
     // constant: integer-constant
     // constant: floating-constant
     
-    Res = Actions.ParseNumericConstant(Tok);
+    Res = Actions.ActOnNumericConstant(Tok);
     ConsumeToken();
     
     // These can be followed by postfix-expr pieces.
@@ -519,14 +519,14 @@
     return ParsePostfixExpressionSuffix(Res);
   }
   case tok::char_constant:     // constant: character-constant
-    Res = Actions.ParseCharacterConstant(Tok);
+    Res = Actions.ActOnCharacterConstant(Tok);
     ConsumeToken();
     // These can be followed by postfix-expr pieces.
     return ParsePostfixExpressionSuffix(Res);    
   case tok::kw___func__:       // primary-expression: __func__ [C99 6.4.2.2]
   case tok::kw___FUNCTION__:   // primary-expression: __FUNCTION__ [GNU]
   case tok::kw___PRETTY_FUNCTION__:  // primary-expression: __P..Y_F..N__ [GNU]
-    Res = Actions.ParsePreDefinedExpr(Tok.getLocation(), SavedKind);
+    Res = Actions.ActOnPreDefinedExpr(Tok.getLocation(), SavedKind);
     ConsumeToken();
     // These can be followed by postfix-expr pieces.
     return ParsePostfixExpressionSuffix(Res);
@@ -546,7 +546,7 @@
     SourceLocation SavedLoc = ConsumeToken();
     Res = ParseCastExpression(true);
     if (!Res.isInvalid)
-      Res = Actions.ParseUnaryOp(SavedLoc, SavedKind, Res.Val);
+      Res = Actions.ActOnUnaryOp(SavedLoc, SavedKind, Res.Val);
     return Res;
   }
   case tok::amp:           // unary-expression: '&' cast-expression
@@ -562,7 +562,7 @@
     SourceLocation SavedLoc = ConsumeToken();
     Res = ParseCastExpression(false);
     if (!Res.isInvalid)
-      Res = Actions.ParseUnaryOp(SavedLoc, SavedKind, Res.Val);
+      Res = Actions.ActOnUnaryOp(SavedLoc, SavedKind, Res.Val);
     return Res;
   }
   case tok::kw_sizeof:     // unary-expression: 'sizeof' unary-expression
@@ -635,7 +635,7 @@
       SourceLocation RLoc = Tok.getLocation();
       
       if (!LHS.isInvalid && !Idx.isInvalid && Tok.getKind() == tok::r_square)
-        LHS = Actions.ParseArraySubscriptExpr(LHS.Val, Loc, Idx.Val, RLoc);
+        LHS = Actions.ActOnArraySubscriptExpr(LHS.Val, Loc, Idx.Val, RLoc);
       else 
         LHS = ExprResult(true);
 
@@ -670,7 +670,7 @@
       if (!LHS.isInvalid && Tok.getKind() == tok::r_paren) {
         assert((ArgExprs.size() == 0 || ArgExprs.size()-1 == CommaLocs.size())&&
                "Unexpected number of commas!");
-        LHS = Actions.ParseCallExpr(LHS.Val, Loc, &ArgExprs[0], ArgExprs.size(),
+        LHS = Actions.ActOnCallExpr(LHS.Val, Loc, &ArgExprs[0], ArgExprs.size(),
                                     &CommaLocs[0], Tok.getLocation());
       }
       
@@ -688,7 +688,7 @@
       }
       
       if (!LHS.isInvalid)
-        LHS = Actions.ParseMemberReferenceExpr(LHS.Val, OpLoc, OpKind,
+        LHS = Actions.ActOnMemberReferenceExpr(LHS.Val, OpLoc, OpKind,
                                                Tok.getLocation(),
                                                *Tok.getIdentifierInfo());
       ConsumeToken();
@@ -697,7 +697,7 @@
     case tok::plusplus:    // postfix-expression: postfix-expression '++'
     case tok::minusminus:  // postfix-expression: postfix-expression '--'
       if (!LHS.isInvalid)
-        LHS = Actions.ParsePostfixUnaryOp(Tok.getLocation(), Tok.getKind(),
+        LHS = Actions.ActOnPostfixUnaryOp(Tok.getLocation(), Tok.getKind(),
                                           LHS.Val);
       ConsumeToken();
       break;
@@ -736,7 +736,7 @@
     // If ParseParenExpression parsed a '(typename)' sequence only, the this is
     // sizeof/alignof a type.  Otherwise, it is sizeof/alignof an expression.
     if (ExprType == CastExpr) {
-      return Actions.ParseSizeOfAlignOfTypeExpr(OpTok.getLocation(),
+      return Actions.ActOnSizeOfAlignOfTypeExpr(OpTok.getLocation(),
                                               OpTok.getKind() == tok::kw_sizeof,
                                                 LParenLoc, CastTy, RParenLoc);
     }
@@ -744,7 +744,7 @@
   
   // If we get here, the operand to the sizeof/alignof was an expresion.
   if (!Operand.isInvalid)
-    Operand = Actions.ParseUnaryOp(OpTok.getLocation(), OpTok.getKind(),
+    Operand = Actions.ActOnUnaryOp(OpTok.getLocation(), OpTok.getKind(),
                                    Operand.Val);
   return Operand;
 }
@@ -955,7 +955,7 @@
       Result = ParseInitializer();
       ExprType = CompoundLiteral;
       if (!Result.isInvalid)
-        return Actions.ParseCompoundLiteral(OpenLoc, Ty, RParenLoc, Result.Val);
+        return Actions.ActOnCompoundLiteral(OpenLoc, Ty, RParenLoc, Result.Val);
     } else if (ExprType == CastExpr) {
       // Note that this doesn't parse the subsequence cast-expression, it just
       // returns the parsed type to the callee.
@@ -971,7 +971,7 @@
     Result = ParseExpression();
     ExprType = SimpleExpr;
     if (!Result.isInvalid && Tok.getKind() == tok::r_paren)
-      Result = Actions.ParseParenExpr(OpenLoc, Tok.getLocation(), Result.Val);
+      Result = Actions.ActOnParenExpr(OpenLoc, Tok.getLocation(), Result.Val);
   }
   
   // Match the ')'.
@@ -1006,5 +1006,5 @@
   } while (isTokenStringLiteral());
 
   // Pass the set of string tokens, ready for concatenation, to the actions.
-  return Actions.ParseStringLiteral(&StringToks[0], StringToks.size());
+  return Actions.ActOnStringLiteral(&StringToks[0], StringToks.size());
 }

Modified: cfe/trunk/Parse/ParseInit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Parse/ParseInit.cpp?rev=41997&r1=41996&r2=41997&view=diff

==============================================================================
--- cfe/trunk/Parse/ParseInit.cpp (original)
+++ cfe/trunk/Parse/ParseInit.cpp Sat Sep 15 22:34:24 2007
@@ -156,7 +156,7 @@
   if (Tok.getKind() == tok::r_brace) {
     Diag(LBraceLoc, diag::ext_gnu_empty_initializer);
     // Match the '}'.
-    return Actions.ParseInitList(LBraceLoc, 0, 0, ConsumeBrace());
+    return Actions.ActOnInitList(LBraceLoc, 0, 0, ConsumeBrace());
   }
   llvm::SmallVector<ExprTy*, 8> InitExprs;
   bool InitExprsOk = true;
@@ -190,7 +190,7 @@
     if (Tok.getKind() == tok::r_brace) break;
   }
   if (InitExprsOk && Tok.getKind() == tok::r_brace)
-    return Actions.ParseInitList(LBraceLoc, &InitExprs[0], InitExprs.size(), 
+    return Actions.ActOnInitList(LBraceLoc, &InitExprs[0], InitExprs.size(), 
                                  ConsumeBrace());
   // Match the '}'.
   MatchRHSPunctuation(tok::r_brace, LBraceLoc);

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

==============================================================================
--- cfe/trunk/Parse/ParseStmt.cpp (original)
+++ cfe/trunk/Parse/ParseStmt.cpp Sat Sep 15 22:34:24 2007
@@ -420,7 +420,7 @@
         }
         
         // Add the __extension__ node to the AST.
-        Res = Actions.ParseUnaryOp(ExtLoc, tok::kw___extension__, Res.Val);
+        Res = Actions.ActOnUnaryOp(ExtLoc, tok::kw___extension__, Res.Val);
         if (Res.isInvalid)
           continue;
         

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

==============================================================================
--- cfe/trunk/Sema/Sema.h (original)
+++ cfe/trunk/Sema/Sema.h Sat Sep 15 22:34:24 2007
@@ -253,59 +253,59 @@
   virtual ExprResult ActOnIdentifierExpr(Scope *S, SourceLocation Loc,
                                          IdentifierInfo &II,
                                          bool HasTrailingLParen);
-  virtual ExprResult ParsePreDefinedExpr(SourceLocation Loc,
+  virtual ExprResult ActOnPreDefinedExpr(SourceLocation Loc,
                                             tok::TokenKind Kind);
-  virtual ExprResult ParseNumericConstant(const Token &);
-  virtual ExprResult ParseCharacterConstant(const Token &);
-  virtual ExprResult ParseParenExpr(SourceLocation L, SourceLocation R,
+  virtual ExprResult ActOnNumericConstant(const Token &);
+  virtual ExprResult ActOnCharacterConstant(const Token &);
+  virtual ExprResult ActOnParenExpr(SourceLocation L, SourceLocation R,
                                     ExprTy *Val);
 
-  /// ParseStringLiteral - The specified tokens were lexed as pasted string
+  /// ActOnStringLiteral - The specified tokens were lexed as pasted string
   /// fragments (e.g. "foo" "bar" L"baz").
-  virtual ExprResult ParseStringLiteral(const Token *Toks, unsigned NumToks);
+  virtual ExprResult ActOnStringLiteral(const Token *Toks, unsigned NumToks);
     
   // Binary/Unary Operators.  'Tok' is the token for the operator.
-  virtual ExprResult ParseUnaryOp(SourceLocation OpLoc, tok::TokenKind Op,
+  virtual ExprResult ActOnUnaryOp(SourceLocation OpLoc, tok::TokenKind Op,
                                   ExprTy *Input);
   virtual ExprResult 
-    ParseSizeOfAlignOfTypeExpr(SourceLocation OpLoc, bool isSizeof, 
+    ActOnSizeOfAlignOfTypeExpr(SourceLocation OpLoc, bool isSizeof, 
                                SourceLocation LParenLoc, TypeTy *Ty,
                                SourceLocation RParenLoc);
   
-  virtual ExprResult ParsePostfixUnaryOp(SourceLocation OpLoc, 
+  virtual ExprResult ActOnPostfixUnaryOp(SourceLocation OpLoc, 
                                          tok::TokenKind Kind, ExprTy *Input);
   
-  virtual ExprResult ParseArraySubscriptExpr(ExprTy *Base, SourceLocation LLoc,
+  virtual ExprResult ActOnArraySubscriptExpr(ExprTy *Base, SourceLocation LLoc,
                                              ExprTy *Idx, SourceLocation RLoc);
-  virtual ExprResult ParseMemberReferenceExpr(ExprTy *Base,SourceLocation OpLoc,
+  virtual ExprResult ActOnMemberReferenceExpr(ExprTy *Base,SourceLocation OpLoc,
                                               tok::TokenKind OpKind,
                                               SourceLocation MemberLoc,
                                               IdentifierInfo &Member);
   
-  /// ParseCallExpr - Handle a call to Fn with the specified array of arguments.
+  /// ActOnCallExpr - Handle a call to Fn with the specified array of arguments.
   /// This provides the location of the left/right parens and a list of comma
   /// locations.
-  virtual ExprResult ParseCallExpr(ExprTy *Fn, SourceLocation LParenLoc,
+  virtual ExprResult ActOnCallExpr(ExprTy *Fn, SourceLocation LParenLoc,
                                    ExprTy **Args, unsigned NumArgs,
                                    SourceLocation *CommaLocs,
                                    SourceLocation RParenLoc);
   
-  virtual ExprResult ParseCastExpr(SourceLocation LParenLoc, TypeTy *Ty,
+  virtual ExprResult ActOnCastExpr(SourceLocation LParenLoc, TypeTy *Ty,
                                    SourceLocation RParenLoc, ExprTy *Op);
                                    
-  virtual ExprResult ParseCompoundLiteral(SourceLocation LParenLoc, TypeTy *Ty,
+  virtual ExprResult ActOnCompoundLiteral(SourceLocation LParenLoc, TypeTy *Ty,
                                           SourceLocation RParenLoc, ExprTy *Op);
   
-  virtual ExprResult ParseInitList(SourceLocation LParenLoc, 
+  virtual ExprResult ActOnInitList(SourceLocation LParenLoc, 
                                    ExprTy **InitList, unsigned NumInit,
                                    SourceLocation RParenLoc);
                                    
-  virtual ExprResult ParseBinOp(SourceLocation TokLoc, tok::TokenKind Kind,
+  virtual ExprResult ActOnBinOp(SourceLocation TokLoc, tok::TokenKind Kind,
                                 ExprTy *LHS,ExprTy *RHS);
   
-  /// ParseConditionalOp - Parse a ?: operation.  Note that 'LHS' may be null
+  /// ActOnConditionalOp - Parse a ?: operation.  Note that 'LHS' may be null
   /// in the case of a the GNU conditional expr extension.
-  virtual ExprResult ParseConditionalOp(SourceLocation QuestionLoc, 
+  virtual ExprResult ActOnConditionalOp(SourceLocation QuestionLoc, 
                                         SourceLocation ColonLoc,
                                         ExprTy *Cond, ExprTy *LHS, ExprTy *RHS);
 
@@ -405,7 +405,7 @@
   // This routine is only used by the following two methods. C99 6.5.16.
   AssignmentCheckResult CheckAssignmentConstraints(QualType lhs, QualType rhs);
   
-  // CheckSingleAssignmentConstraints - Currently used by ParseCallExpr,
+  // CheckSingleAssignmentConstraints - Currently used by ActOnCallExpr,
   // CheckAssignmentOperands, and ParseReturnStmt. Prior to type checking, 
   // this routine performs the default function/array converions.
   AssignmentCheckResult CheckSingleAssignmentConstraints(QualType lhs, 
@@ -423,7 +423,7 @@
   /// the following "Check" methods will return a valid/converted QualType
   /// or a null QualType (indicating an error diagnostic was issued).
     
-  /// type checking binary operators (subroutines of ParseBinOp).
+  /// type checking binary operators (subroutines of ActOnBinOp).
   inline void InvalidOperands(SourceLocation l, Expr *&lex, Expr *&rex);
   inline QualType CheckVectorOperands(SourceLocation l, Expr *&lex, Expr *&rex);
   inline QualType CheckMultiplyDivideOperands( // C99 6.5.5
@@ -452,7 +452,7 @@
   inline QualType CheckConditionalOperands( // C99 6.5.15
     Expr *&cond, Expr *&lhs, Expr *&rhs, SourceLocation questionLoc);
   
-  /// type checking unary operators (subroutines of ParseUnaryOp).
+  /// type checking unary operators (subroutines of ActOnUnaryOp).
   /// C99 6.5.3.1, 6.5.3.2, 6.5.3.4
   QualType CheckIncrementDecrementOperand(Expr *op, SourceLocation OpLoc);   
   QualType CheckAddressOfOperand(Expr *op, SourceLocation OpLoc);

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

==============================================================================
--- cfe/trunk/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/Sema/SemaExpr.cpp Sat Sep 15 22:34:24 2007
@@ -25,14 +25,14 @@
 #include "llvm/ADT/StringExtras.h"
 using namespace clang;
 
-/// ParseStringLiteral - The specified tokens were lexed as pasted string
+/// ActOnStringLiteral - The specified tokens were lexed as pasted string
 /// fragments (e.g. "foo" "bar" L"baz").  The result string has to handle string
 /// concatenation ([C99 5.1.1.2, translation phase #6]), so it may come from
 /// multiple tokens.  However, the common case is that StringToks points to one
 /// string.
 /// 
 Action::ExprResult
-Sema::ParseStringLiteral(const Token *StringToks, unsigned NumStringToks) {
+Sema::ActOnStringLiteral(const Token *StringToks, unsigned NumStringToks) {
   assert(NumStringToks && "Must have at least one string!");
 
   StringLiteralParser Literal(StringToks, NumStringToks, PP, Context.Target);
@@ -87,7 +87,7 @@
   abort();
 }
 
-Sema::ExprResult Sema::ParsePreDefinedExpr(SourceLocation Loc,
+Sema::ExprResult Sema::ActOnPreDefinedExpr(SourceLocation Loc,
                                            tok::TokenKind Kind) {
   PreDefinedExpr::IdentType IT;
   
@@ -109,7 +109,7 @@
   return new PreDefinedExpr(Loc, Context.getPointerType(Context.CharTy), IT);
 }
 
-Sema::ExprResult Sema::ParseCharacterConstant(const Token &Tok) {
+Sema::ExprResult Sema::ActOnCharacterConstant(const Token &Tok) {
   llvm::SmallString<16> CharBuffer;
   CharBuffer.resize(Tok.getLength());
   const char *ThisTokBegin = &CharBuffer[0];
@@ -123,7 +123,7 @@
                               Tok.getLocation());
 }
 
-Action::ExprResult Sema::ParseNumericConstant(const Token &Tok) {
+Action::ExprResult Sema::ActOnNumericConstant(const Token &Tok) {
   // fast path for a single digit (which is quite common). A single digit 
   // cannot have a trigraph, escaped newline, radix prefix, or type suffix.
   if (Tok.getLength() == 1) {
@@ -247,10 +247,10 @@
   return Res;
 }
 
-Action::ExprResult Sema::ParseParenExpr(SourceLocation L, SourceLocation R,
+Action::ExprResult Sema::ActOnParenExpr(SourceLocation L, SourceLocation R,
                                         ExprTy *Val) {
   Expr *e = (Expr *)Val;
-  assert((e != 0) && "ParseParenExpr() missing expr");
+  assert((e != 0) && "ActOnParenExpr() missing expr");
   return new ParenExpr(L, R, e);
 }
 
@@ -275,7 +275,7 @@
 }
 
 Action::ExprResult Sema::
-ParseSizeOfAlignOfTypeExpr(SourceLocation OpLoc, bool isSizeof, 
+ActOnSizeOfAlignOfTypeExpr(SourceLocation OpLoc, bool isSizeof, 
                            SourceLocation LPLoc, TypeTy *Ty,
                            SourceLocation RPLoc) {
   // If error parsing type, ignore.
@@ -309,7 +309,7 @@
 
 
 
-Action::ExprResult Sema::ParsePostfixUnaryOp(SourceLocation OpLoc, 
+Action::ExprResult Sema::ActOnPostfixUnaryOp(SourceLocation OpLoc, 
                                              tok::TokenKind Kind,
                                              ExprTy *Input) {
   UnaryOperator::Opcode Opc;
@@ -325,7 +325,7 @@
 }
 
 Action::ExprResult Sema::
-ParseArraySubscriptExpr(ExprTy *Base, SourceLocation LLoc,
+ActOnArraySubscriptExpr(ExprTy *Base, SourceLocation LLoc,
                         ExprTy *Idx, SourceLocation RLoc) {
   Expr *LHSExp = static_cast<Expr*>(Base), *RHSExp = static_cast<Expr*>(Idx);
 
@@ -449,7 +449,7 @@
 }
 
 Action::ExprResult Sema::
-ParseMemberReferenceExpr(ExprTy *Base, SourceLocation OpLoc,
+ActOnMemberReferenceExpr(ExprTy *Base, SourceLocation OpLoc,
                          tok::TokenKind OpKind, SourceLocation MemberLoc,
                          IdentifierInfo &Member) {
   Expr *BaseExpr = static_cast<Expr *>(Base);
@@ -491,11 +491,11 @@
                 SourceRange(MemberLoc));
 }
 
-/// ParseCallExpr - Handle a call to Fn with the specified array of arguments.
+/// ActOnCallExpr - Handle a call to Fn with the specified array of arguments.
 /// This provides the location of the left/right parens and a list of comma
 /// locations.
 Action::ExprResult Sema::
-ParseCallExpr(ExprTy *fn, SourceLocation LParenLoc,
+ActOnCallExpr(ExprTy *fn, SourceLocation LParenLoc,
               ExprTy **args, unsigned NumArgsInCall,
               SourceLocation *CommaLocs, SourceLocation RParenLoc) {
   Expr *Fn = static_cast<Expr *>(fn);
@@ -542,7 +542,7 @@
     // Continue to check argument types (even if we have too few/many args).
     for (unsigned i = 0; i < NumArgsToCheck; i++) {
       Expr *argExpr = Args[i];
-      assert(argExpr && "ParseCallExpr(): missing argument expression");
+      assert(argExpr && "ActOnCallExpr(): missing argument expression");
       
       QualType lhsType = proto->getArgType(i);
       QualType rhsType = argExpr->getType();
@@ -596,7 +596,7 @@
       // Promote the arguments (C99 6.5.2.2p7).
       for (unsigned i = NumArgsInProto; i < NumArgsInCall; i++) {
         Expr *argExpr = Args[i];
-        assert(argExpr && "ParseCallExpr(): missing argument expression");
+        assert(argExpr && "ActOnCallExpr(): missing argument expression");
         
         DefaultArgumentPromotion(argExpr);
         if (Args[i] != argExpr) // The expression was converted.
@@ -610,7 +610,7 @@
     // Promote the arguments (C99 6.5.2.2p6).
     for (unsigned i = 0; i < NumArgsInCall; i++) {
       Expr *argExpr = Args[i];
-      assert(argExpr && "ParseCallExpr(): missing argument expression");
+      assert(argExpr && "ActOnCallExpr(): missing argument expression");
       
       DefaultArgumentPromotion(argExpr);
       if (Args[i] != argExpr) // The expression was converted.
@@ -629,12 +629,12 @@
 }
 
 Action::ExprResult Sema::
-ParseCompoundLiteral(SourceLocation LParenLoc, TypeTy *Ty,
+ActOnCompoundLiteral(SourceLocation LParenLoc, TypeTy *Ty,
                      SourceLocation RParenLoc, ExprTy *InitExpr) {
-  assert((Ty != 0) && "ParseCompoundLiteral(): missing type");
+  assert((Ty != 0) && "ActOnCompoundLiteral(): missing type");
   QualType literalType = QualType::getFromOpaquePtr(Ty);
   // FIXME: put back this assert when initializers are worked out.
-  //assert((InitExpr != 0) && "ParseCompoundLiteral(): missing expression");
+  //assert((InitExpr != 0) && "ActOnCompoundLiteral(): missing expression");
   Expr *literalExpr = static_cast<Expr*>(InitExpr);
   
   // FIXME: add semantic analysis (C99 6.5.2.5).
@@ -642,7 +642,7 @@
 }
 
 Action::ExprResult Sema::
-ParseInitList(SourceLocation LBraceLoc, ExprTy **initlist, unsigned NumInit,
+ActOnInitList(SourceLocation LBraceLoc, ExprTy **initlist, unsigned NumInit,
               SourceLocation RBraceLoc) {
   Expr **InitList = reinterpret_cast<Expr**>(initlist);
 
@@ -655,9 +655,9 @@
 }
 
 Action::ExprResult Sema::
-ParseCastExpr(SourceLocation LParenLoc, TypeTy *Ty,
+ActOnCastExpr(SourceLocation LParenLoc, TypeTy *Ty,
               SourceLocation RParenLoc, ExprTy *Op) {
-  assert((Ty != 0) && (Op != 0) && "ParseCastExpr(): missing type or expr");
+  assert((Ty != 0) && (Op != 0) && "ActOnCastExpr(): missing type or expr");
 
   Expr *castExpr = static_cast<Expr*>(Op);
   QualType castType = QualType::getFromOpaquePtr(Ty);
@@ -755,9 +755,9 @@
   return QualType();
 }
 
-/// ParseConditionalOp - Parse a ?: operation.  Note that 'LHS' may be null
+/// ActOnConditionalOp - Parse a ?: operation.  Note that 'LHS' may be null
 /// in the case of a the GNU conditional expr extension.
-Action::ExprResult Sema::ParseConditionalOp(SourceLocation QuestionLoc, 
+Action::ExprResult Sema::ActOnConditionalOp(SourceLocation QuestionLoc, 
                                             SourceLocation ColonLoc,
                                             ExprTy *Cond, ExprTy *LHS,
                                             ExprTy *RHS) {
@@ -1516,13 +1516,13 @@
 }
 
 // Binary Operators.  'Tok' is the token for the operator.
-Action::ExprResult Sema::ParseBinOp(SourceLocation TokLoc, tok::TokenKind Kind,
+Action::ExprResult Sema::ActOnBinOp(SourceLocation TokLoc, tok::TokenKind Kind,
                                     ExprTy *LHS, ExprTy *RHS) {
   BinaryOperator::Opcode Opc = ConvertTokenKindToBinaryOpcode(Kind);
   Expr *lhs = (Expr *)LHS, *rhs = (Expr*)RHS;
 
-  assert((lhs != 0) && "ParseBinOp(): missing left expression");
-  assert((rhs != 0) && "ParseBinOp(): missing right expression");
+  assert((lhs != 0) && "ActOnBinOp(): missing left expression");
+  assert((rhs != 0) && "ActOnBinOp(): missing right expression");
 
   QualType ResultTy;  // Result type of the binary operator.
   QualType CompTy;    // Computation type for compound assignments (e.g. '+=')
@@ -1616,7 +1616,7 @@
 }
 
 // Unary Operators.  'Tok' is the token for the operator.
-Action::ExprResult Sema::ParseUnaryOp(SourceLocation OpLoc, tok::TokenKind Op,
+Action::ExprResult Sema::ActOnUnaryOp(SourceLocation OpLoc, tok::TokenKind Op,
                                       ExprTy *input) {
   Expr *Input = (Expr*)input;
   UnaryOperator::Opcode Opc = ConvertTokenKindToUnaryOpcode(Op);

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

==============================================================================
--- cfe/trunk/include/clang/Parse/Action.h (original)
+++ cfe/trunk/include/clang/Parse/Action.h Sat Sep 15 22:34:24 2007
@@ -297,45 +297,45 @@
     return 0;
   }
   
-  virtual ExprResult ParsePreDefinedExpr(SourceLocation Loc,
+  virtual ExprResult ActOnPreDefinedExpr(SourceLocation Loc,
                                          tok::TokenKind Kind) {
     return 0;
   }
-  virtual ExprResult ParseCharacterConstant(const Token &) { return 0; }
-  virtual ExprResult ParseNumericConstant(const Token &) { return 0; }
+  virtual ExprResult ActOnCharacterConstant(const Token &) { return 0; }
+  virtual ExprResult ActOnNumericConstant(const Token &) { return 0; }
   
-  /// ParseStringLiteral - The specified tokens were lexed as pasted string
+  /// ActOnStringLiteral - The specified tokens were lexed as pasted string
   /// fragments (e.g. "foo" "bar" L"baz").
-  virtual ExprResult ParseStringLiteral(const Token *Toks, unsigned NumToks) {
+  virtual ExprResult ActOnStringLiteral(const Token *Toks, unsigned NumToks) {
     return 0;
   }
   
-  virtual ExprResult ParseParenExpr(SourceLocation L, SourceLocation R,
+  virtual ExprResult ActOnParenExpr(SourceLocation L, SourceLocation R,
                                     ExprTy *Val) {
     return Val;  // Default impl returns operand.
   }
   
   // Postfix Expressions.
-  virtual ExprResult ParsePostfixUnaryOp(SourceLocation OpLoc, 
+  virtual ExprResult ActOnPostfixUnaryOp(SourceLocation OpLoc, 
                                          tok::TokenKind Kind, ExprTy *Input) {
     return 0;
   }
-  virtual ExprResult ParseArraySubscriptExpr(ExprTy *Base, SourceLocation LLoc,
+  virtual ExprResult ActOnArraySubscriptExpr(ExprTy *Base, SourceLocation LLoc,
                                              ExprTy *Idx, SourceLocation RLoc) {
     return 0;
   }
-  virtual ExprResult ParseMemberReferenceExpr(ExprTy *Base,SourceLocation OpLoc,
+  virtual ExprResult ActOnMemberReferenceExpr(ExprTy *Base,SourceLocation OpLoc,
                                               tok::TokenKind OpKind,
                                               SourceLocation MemberLoc,
                                               IdentifierInfo &Member) {
     return 0;
   }
   
-  /// ParseCallExpr - Handle a call to Fn with the specified array of arguments.
+  /// ActOnCallExpr - Handle a call to Fn with the specified array of arguments.
   /// This provides the location of the left/right parens and a list of comma
   /// locations.  There are guaranteed to be one fewer commas than arguments,
   /// unless there are zero arguments.
-  virtual ExprResult ParseCallExpr(ExprTy *Fn, SourceLocation LParenLoc,
+  virtual ExprResult ActOnCallExpr(ExprTy *Fn, SourceLocation LParenLoc,
                                    ExprTy **Args, unsigned NumArgs,
                                    SourceLocation *CommaLocs,
                                    SourceLocation RParenLoc) {
@@ -343,39 +343,39 @@
   }
   
   // Unary Operators.  'Tok' is the token for the operator.
-  virtual ExprResult ParseUnaryOp(SourceLocation OpLoc, tok::TokenKind Op,
+  virtual ExprResult ActOnUnaryOp(SourceLocation OpLoc, tok::TokenKind Op,
                                   ExprTy *Input) {
     return 0;
   }
   virtual ExprResult 
-    ParseSizeOfAlignOfTypeExpr(SourceLocation OpLoc, bool isSizeof, 
+    ActOnSizeOfAlignOfTypeExpr(SourceLocation OpLoc, bool isSizeof, 
                                SourceLocation LParenLoc, TypeTy *Ty,
                                SourceLocation RParenLoc) {
     return 0;
   }
   
-  virtual ExprResult ParseCompoundLiteral(SourceLocation LParen, TypeTy *Ty,
+  virtual ExprResult ActOnCompoundLiteral(SourceLocation LParen, TypeTy *Ty,
                                           SourceLocation RParen, ExprTy *Op) {
     return 0;
   }
-  virtual ExprResult ParseInitList(SourceLocation LParenLoc,
+  virtual ExprResult ActOnInitList(SourceLocation LParenLoc,
                                    ExprTy **InitList, unsigned NumInit,
                                    SourceLocation RParenLoc) {
     return 0;
   }
-  virtual ExprResult ParseCastExpr(SourceLocation LParenLoc, TypeTy *Ty,
+  virtual ExprResult ActOnCastExpr(SourceLocation LParenLoc, TypeTy *Ty,
                                    SourceLocation RParenLoc, ExprTy *Op) {
     return 0;
   }
   
-  virtual ExprResult ParseBinOp(SourceLocation TokLoc, tok::TokenKind Kind,
+  virtual ExprResult ActOnBinOp(SourceLocation TokLoc, tok::TokenKind Kind,
                                 ExprTy *LHS, ExprTy *RHS) {
     return 0;
   }
 
-  /// ParseConditionalOp - Parse a ?: operation.  Note that 'LHS' may be null
+  /// ActOnConditionalOp - Parse a ?: operation.  Note that 'LHS' may be null
   /// in the case of a the GNU conditional expr extension.
-  virtual ExprResult ParseConditionalOp(SourceLocation QuestionLoc, 
+  virtual ExprResult ActOnConditionalOp(SourceLocation QuestionLoc, 
                                         SourceLocation ColonLoc,
                                         ExprTy *Cond, ExprTy *LHS, ExprTy *RHS){
     return 0;





More information about the cfe-commits mailing list