ActOnReturnStmt should also take a FullExprArg.

llvm-svn: 72641
This commit is contained in:
Anders Carlsson 2009-05-30 21:42:34 +00:00
parent 5e9444f541
commit 5de832ecfa
6 changed files with 7 additions and 7 deletions

View File

@ -551,7 +551,7 @@ public:
return StmtEmpty();
}
virtual OwningStmtResult ActOnReturnStmt(SourceLocation ReturnLoc,
ExprArg RetValExp) {
FullExprArg RetValExp) {
return StmtEmpty();
}
virtual OwningStmtResult ActOnAsmStmt(SourceLocation AsmLoc,

View File

@ -369,7 +369,7 @@ namespace {
return StmtEmpty();
}
virtual OwningStmtResult ActOnReturnStmt(SourceLocation ReturnLoc,
ExprArg RetValExp) {
FullExprArg RetValExp) {
Out << __FUNCTION__ << "\n";
return StmtEmpty();
}

View 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

View File

@ -1215,7 +1215,7 @@ public:
Scope *CurScope);
virtual OwningStmtResult ActOnReturnStmt(SourceLocation ReturnLoc,
ExprArg RetValExp);
FullExprArg RetValExp);
OwningStmtResult ActOnBlockReturnStmt(SourceLocation ReturnLoc,
Expr *RetValExp);

View 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);

View 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