[flang] Remove useless dummy return statements
I first added these because I had issues with return type deduction in lambdas, but they are actually useless when the return type is specified in the lambda signature. Original-commit: flang-compiler/f18@5bcbbd8bdc Tree-same-pre-rewrite: false
This commit is contained in:
parent
54a3e9af38
commit
382aafad68
2 changed files with 1 additions and 4 deletions
|
@ -394,7 +394,6 @@ Expr<Type<TypeCategory::Integer, KIND>> FoldOperation(FoldingContext &context,
|
|||
return Fold(context, ConvertToType<T>(std::move(x)));
|
||||
}
|
||||
common::die("int() argument type not valid");
|
||||
return Expr<T>{std::move(funcRef)}; // unreachable
|
||||
},
|
||||
std::move(args[0].value().value().u));
|
||||
} else if (name == "kind") {
|
||||
|
@ -621,7 +620,6 @@ Expr<Type<TypeCategory::Real, KIND>> FoldOperation(FoldingContext &context,
|
|||
return Fold(context, ConvertToType<T>(std::move(x)));
|
||||
}
|
||||
common::die("real() argument type not valid");
|
||||
return Expr<T>{std::move(funcRef)}; // unreachable
|
||||
},
|
||||
std::move(args[0].value().value().u));
|
||||
}
|
||||
|
|
|
@ -73,9 +73,8 @@ template<typename TR, typename... ArgInfo> struct CallableHostWrapper {
|
|||
hostFPE.CheckAndRestoreFloatingPointEnvironment(context);
|
||||
return host::CastHostToFortran<TR>(res);
|
||||
} else {
|
||||
common::die("Internal error: Host does not supports this function types."
|
||||
common::die("Internal error: Host does not supports this function type."
|
||||
"This should not have been called for folding");
|
||||
return Scalar<TR>{}; // unreachable
|
||||
}
|
||||
}
|
||||
static constexpr inline auto MakeScalarCallable() { return &scalarCallable; }
|
||||
|
|
Loading…
Reference in a new issue