forked from OSchip/llvm-project
ActOnReturnStmt should also take a FullExprArg.
llvm-svn: 72641
This commit is contained in:
parent
5e9444f541
commit
5de832ecfa
|
@ -551,7 +551,7 @@ public:
|
||||||
return StmtEmpty();
|
return StmtEmpty();
|
||||||
}
|
}
|
||||||
virtual OwningStmtResult ActOnReturnStmt(SourceLocation ReturnLoc,
|
virtual OwningStmtResult ActOnReturnStmt(SourceLocation ReturnLoc,
|
||||||
ExprArg RetValExp) {
|
FullExprArg RetValExp) {
|
||||||
return StmtEmpty();
|
return StmtEmpty();
|
||||||
}
|
}
|
||||||
virtual OwningStmtResult ActOnAsmStmt(SourceLocation AsmLoc,
|
virtual OwningStmtResult ActOnAsmStmt(SourceLocation AsmLoc,
|
||||||
|
|
|
@ -369,7 +369,7 @@ namespace {
|
||||||
return StmtEmpty();
|
return StmtEmpty();
|
||||||
}
|
}
|
||||||
virtual OwningStmtResult ActOnReturnStmt(SourceLocation ReturnLoc,
|
virtual OwningStmtResult ActOnReturnStmt(SourceLocation ReturnLoc,
|
||||||
ExprArg RetValExp) {
|
FullExprArg RetValExp) {
|
||||||
Out << __FUNCTION__ << "\n";
|
Out << __FUNCTION__ << "\n";
|
||||||
return StmtEmpty();
|
return StmtEmpty();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1071,7 +1071,7 @@ Parser::OwningStmtResult Parser::ParseReturnStatement() {
|
||||||
return StmtError();
|
return StmtError();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Actions.ActOnReturnStmt(ReturnLoc, move(R));
|
return Actions.ActOnReturnStmt(ReturnLoc, Actions.FullExpr(R));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// FuzzyParseMicrosoftAsmStatement. When -fms-extensions is enabled, this
|
/// FuzzyParseMicrosoftAsmStatement. When -fms-extensions is enabled, this
|
||||||
|
|
|
@ -1215,7 +1215,7 @@ public:
|
||||||
Scope *CurScope);
|
Scope *CurScope);
|
||||||
|
|
||||||
virtual OwningStmtResult ActOnReturnStmt(SourceLocation ReturnLoc,
|
virtual OwningStmtResult ActOnReturnStmt(SourceLocation ReturnLoc,
|
||||||
ExprArg RetValExp);
|
FullExprArg RetValExp);
|
||||||
OwningStmtResult ActOnBlockReturnStmt(SourceLocation ReturnLoc,
|
OwningStmtResult ActOnBlockReturnStmt(SourceLocation ReturnLoc,
|
||||||
Expr *RetValExp);
|
Expr *RetValExp);
|
||||||
|
|
||||||
|
|
|
@ -826,8 +826,8 @@ static bool IsReturnCopyElidable(ASTContext &Ctx, QualType RetType,
|
||||||
}
|
}
|
||||||
|
|
||||||
Action::OwningStmtResult
|
Action::OwningStmtResult
|
||||||
Sema::ActOnReturnStmt(SourceLocation ReturnLoc, ExprArg rex) {
|
Sema::ActOnReturnStmt(SourceLocation ReturnLoc, FullExprArg rex) {
|
||||||
Expr *RetValExp = rex.takeAs<Expr>();
|
Expr *RetValExp = rex->takeAs<Expr>();
|
||||||
if (CurBlock)
|
if (CurBlock)
|
||||||
return ActOnBlockReturnStmt(ReturnLoc, RetValExp);
|
return ActOnBlockReturnStmt(ReturnLoc, RetValExp);
|
||||||
|
|
||||||
|
|
|
@ -130,7 +130,7 @@ TemplateStmtInstantiator::VisitReturnStmt(ReturnStmt *S) {
|
||||||
return SemaRef.StmtError();
|
return SemaRef.StmtError();
|
||||||
}
|
}
|
||||||
|
|
||||||
return SemaRef.ActOnReturnStmt(S->getReturnLoc(), move(Result));
|
return SemaRef.ActOnReturnStmt(S->getReturnLoc(), FullExpr(Result));
|
||||||
}
|
}
|
||||||
|
|
||||||
Sema::OwningStmtResult
|
Sema::OwningStmtResult
|
||||||
|
|
Loading…
Reference in New Issue