[cfe-commits] r72641 - in /cfe/trunk: include/clang/Parse/Action.h lib/Frontend/PrintParserCallbacks.cpp lib/Parse/ParseStmt.cpp lib/Sema/Sema.h lib/Sema/SemaStmt.cpp lib/Sema/SemaTemplateInstantiateStmt.cpp

Anders Carlsson andersca at mac.com
Sat May 30 14:42:34 PDT 2009


Author: andersca
Date: Sat May 30 16:42:34 2009
New Revision: 72641

URL: http://llvm.org/viewvc/llvm-project?rev=72641&view=rev
Log:
ActOnReturnStmt should also take a FullExprArg.

Modified:
    cfe/trunk/include/clang/Parse/Action.h
    cfe/trunk/lib/Frontend/PrintParserCallbacks.cpp
    cfe/trunk/lib/Parse/ParseStmt.cpp
    cfe/trunk/lib/Sema/Sema.h
    cfe/trunk/lib/Sema/SemaStmt.cpp
    cfe/trunk/lib/Sema/SemaTemplateInstantiateStmt.cpp

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

==============================================================================
--- cfe/trunk/include/clang/Parse/Action.h (original)
+++ cfe/trunk/include/clang/Parse/Action.h Sat May 30 16:42:34 2009
@@ -551,7 +551,7 @@
     return StmtEmpty();
   }
   virtual OwningStmtResult ActOnReturnStmt(SourceLocation ReturnLoc,
-                                           ExprArg RetValExp) {
+                                           FullExprArg RetValExp) {
     return StmtEmpty();
   }
   virtual OwningStmtResult ActOnAsmStmt(SourceLocation AsmLoc,

Modified: cfe/trunk/lib/Frontend/PrintParserCallbacks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PrintParserCallbacks.cpp?rev=72641&r1=72640&r2=72641&view=diff

==============================================================================
--- cfe/trunk/lib/Frontend/PrintParserCallbacks.cpp (original)
+++ cfe/trunk/lib/Frontend/PrintParserCallbacks.cpp Sat May 30 16:42:34 2009
@@ -369,7 +369,7 @@
       return StmtEmpty();
     }
     virtual OwningStmtResult ActOnReturnStmt(SourceLocation ReturnLoc,
-                                             ExprArg RetValExp) {
+                                             FullExprArg RetValExp) {
       Out << __FUNCTION__ << "\n";
       return StmtEmpty();
     }

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

==============================================================================
--- cfe/trunk/lib/Parse/ParseStmt.cpp (original)
+++ cfe/trunk/lib/Parse/ParseStmt.cpp Sat May 30 16:42:34 2009
@@ -1071,7 +1071,7 @@
       return StmtError();
     }
   }
-  return Actions.ActOnReturnStmt(ReturnLoc, move(R));
+  return Actions.ActOnReturnStmt(ReturnLoc, Actions.FullExpr(R));
 }
 
 /// FuzzyParseMicrosoftAsmStatement. When -fms-extensions is enabled, this

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

==============================================================================
--- cfe/trunk/lib/Sema/Sema.h (original)
+++ cfe/trunk/lib/Sema/Sema.h Sat May 30 16:42:34 2009
@@ -1215,7 +1215,7 @@
                                           Scope *CurScope);
 
   virtual OwningStmtResult ActOnReturnStmt(SourceLocation ReturnLoc,
-                                           ExprArg RetValExp);
+                                           FullExprArg RetValExp);
   OwningStmtResult ActOnBlockReturnStmt(SourceLocation ReturnLoc,
                                         Expr *RetValExp);
 

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

==============================================================================
--- cfe/trunk/lib/Sema/SemaStmt.cpp (original)
+++ cfe/trunk/lib/Sema/SemaStmt.cpp Sat May 30 16:42:34 2009
@@ -826,8 +826,8 @@
 }
 
 Action::OwningStmtResult
-Sema::ActOnReturnStmt(SourceLocation ReturnLoc, ExprArg rex) {
-  Expr *RetValExp = rex.takeAs<Expr>();
+Sema::ActOnReturnStmt(SourceLocation ReturnLoc, FullExprArg rex) {
+  Expr *RetValExp = rex->takeAs<Expr>();
   if (CurBlock)
     return ActOnBlockReturnStmt(ReturnLoc, RetValExp);
 

Modified: cfe/trunk/lib/Sema/SemaTemplateInstantiateStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaTemplateInstantiateStmt.cpp?rev=72641&r1=72640&r2=72641&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaTemplateInstantiateStmt.cpp (original)
+++ cfe/trunk/lib/Sema/SemaTemplateInstantiateStmt.cpp Sat May 30 16:42:34 2009
@@ -130,7 +130,7 @@
       return SemaRef.StmtError();
   }
   
-  return SemaRef.ActOnReturnStmt(S->getReturnLoc(), move(Result));
+  return SemaRef.ActOnReturnStmt(S->getReturnLoc(), FullExpr(Result));
 }
 
 Sema::OwningStmtResult 





More information about the cfe-commits mailing list