]> granicus.if.org Git - clang/commitdiff
ActOnReturnStmt should also take a FullExprArg.
authorAnders Carlsson <andersca@mac.com>
Sat, 30 May 2009 21:42:34 +0000 (21:42 +0000)
committerAnders Carlsson <andersca@mac.com>
Sat, 30 May 2009 21:42:34 +0000 (21:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72641 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 2ef87be13bdcec646693dc43314d43d7918b15d5..5c23f9ac6147f55b85ce223cdb173553550c4c20 100644 (file)
@@ -551,7 +551,7 @@ public:
     return StmtEmpty();
   }
   virtual OwningStmtResult ActOnReturnStmt(SourceLocation ReturnLoc,
-                                           ExprArg RetValExp) {
+                                           FullExprArg RetValExp) {
     return StmtEmpty();
   }
   virtual OwningStmtResult ActOnAsmStmt(SourceLocation AsmLoc,
index fbac3c88aa34b23f46478730331b98cbc4107eaa..f02d5d469c6483c0d32ae58354e68397dd533921 100644 (file)
@@ -369,7 +369,7 @@ namespace {
       return StmtEmpty();
     }
     virtual OwningStmtResult ActOnReturnStmt(SourceLocation ReturnLoc,
-                                             ExprArg RetValExp) {
+                                             FullExprArg RetValExp) {
       Out << __FUNCTION__ << "\n";
       return StmtEmpty();
     }
index 952c4c15f3bb3c3e0bb4747a2e28cbff8892ab88..758b662a2392dcf27f1ac30fe7436202ab559f8e 100644 (file)
@@ -1071,7 +1071,7 @@ Parser::OwningStmtResult Parser::ParseReturnStatement() {
       return StmtError();
     }
   }
-  return Actions.ActOnReturnStmt(ReturnLoc, move(R));
+  return Actions.ActOnReturnStmt(ReturnLoc, Actions.FullExpr(R));
 }
 
 /// FuzzyParseMicrosoftAsmStatement. When -fms-extensions is enabled, this
index 9939781667794b006661bc34973fb9916c4996aa..b2540ba2e05fb648962b9c813ead07bc9f64644a 100644 (file)
@@ -1215,7 +1215,7 @@ public:
                                           Scope *CurScope);
 
   virtual OwningStmtResult ActOnReturnStmt(SourceLocation ReturnLoc,
-                                           ExprArg RetValExp);
+                                           FullExprArg RetValExp);
   OwningStmtResult ActOnBlockReturnStmt(SourceLocation ReturnLoc,
                                         Expr *RetValExp);
 
index 1a1362e6699f03275cb383e9e33e689bb4f9dddf..879d84e36c677f6ec86dad36686f51db4f1fd5b8 100644 (file)
@@ -826,8 +826,8 @@ static bool IsReturnCopyElidable(ASTContext &Ctx, QualType RetType,
 }
 
 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);
 
index 91807c3e6a230cba3b6cbab5a3d3cd859e2f3de0..1f69479a0e7c998d3796b331544c3f91cf8a6e1c 100644 (file)
@@ -130,7 +130,7 @@ TemplateStmtInstantiator::VisitReturnStmt(ReturnStmt *S) {
       return SemaRef.StmtError();
   }
   
-  return SemaRef.ActOnReturnStmt(S->getReturnLoc(), move(Result));
+  return SemaRef.ActOnReturnStmt(S->getReturnLoc(), FullExpr(Result));
 }
 
 Sema::OwningStmtResult