Lines Matching defs:RetValExp

2772 Sema::ActOnCapScopeReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp) {
2788 if (DeduceFunctionTypeFromReturnExpr(FD, ReturnLoc, RetValExp, AT)) {
2798 if (RetValExp && !isa<InitListExpr>(RetValExp)) {
2799 ExprResult Result = DefaultFunctionArrayLvalueConversion(RetValExp);
2802 RetValExp = Result.get();
2809 FnRetType = RetValExp->getType().getUnqualifiedType();
2813 if (RetValExp) {
2818 << RetValExp->getSourceRange();
2857 if (RetValExp && !isa<InitListExpr>(RetValExp) &&
2859 (RetValExp->isTypeDependent() ||
2860 RetValExp->getType()->isVoidType()))) {
2862 RetValExp->getType()->isVoidType())
2866 RetValExp = nullptr;
2869 } else if (!RetValExp) {
2871 } else if (!RetValExp->isTypeDependent()) {
2880 NRVOCandidate = getCopyElisionCandidate(FnRetType, RetValExp, false);
2885 FnRetType, RetValExp);
2890 RetValExp = Res.get();
2891 CheckReturnValExpr(RetValExp, FnRetType, ReturnLoc);
2893 NRVOCandidate = getCopyElisionCandidate(FnRetType, RetValExp, false);
2896 if (RetValExp) {
2897 ExprResult ER = ActOnFinishFullExpr(RetValExp, ReturnLoc);
2900 RetValExp = ER.get();
2902 ReturnStmt *Result = new (Context) ReturnStmt(ReturnLoc, RetValExp,
3050 Sema::ActOnReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp,
3052 StmtResult R = BuildReturnStmt(ReturnLoc, RetValExp);
3069 StmtResult Sema::BuildReturnStmt(SourceLocation ReturnLoc, Expr *RetValExp) {
3071 if (RetValExp && DiagnoseUnexpandedParameterPack(RetValExp))
3075 return ActOnCapScopeReturnStmt(ReturnLoc, RetValExp);
3109 if (DeduceFunctionTypeFromReturnExpr(FD, ReturnLoc, RetValExp, AT)) {
3122 if (RetValExp) {
3123 if (isa<InitListExpr>(RetValExp)) {
3138 << RetValExp->getSourceRange();
3141 RetValExp = nullptr;
3142 } else if (!RetValExp->isTypeDependent()) {
3145 if (RetValExp->getType()->isVoidType()) {
3154 ExprResult Result = RetValExp;
3158 RetValExp = Result.get();
3159 RetValExp = ImpCastExprToType(RetValExp,
3167 << RetValExp->getSourceRange();
3184 << RetValExp->getSourceRange();
3188 if (RetValExp) {
3189 ExprResult ER = ActOnFinishFullExpr(RetValExp, ReturnLoc);
3192 RetValExp = ER.get();
3196 Result = new (Context) ReturnStmt(ReturnLoc, RetValExp, nullptr);
3197 } else if (!RetValExp && !HasDependentReturnType) {
3220 assert(RetValExp || HasDependentReturnType);
3231 if (RetValExp)
3232 NRVOCandidate = getCopyElisionCandidate(FnRetType, RetValExp, false);
3233 if (!HasDependentReturnType && !RetValExp->isTypeDependent()) {
3239 RetType, RetValExp);
3244 RetValExp = Res.getAs<Expr>();
3253 Res = PerformCopyInitialization(Entity, ReturnLoc, RetValExp);
3258 RetValExp = Res.getAs<Expr>();
3261 CheckReturnValExpr(RetValExp, FnRetType, ReturnLoc, isObjCMethod, Attrs,
3265 if (RetValExp) {
3266 ExprResult ER = ActOnFinishFullExpr(RetValExp, ReturnLoc);
3269 RetValExp = ER.get();
3271 Result = new (Context) ReturnStmt(ReturnLoc, RetValExp, NRVOCandidate);