[flang] implement the DO WHILE check
Original-commit: flang-compiler/f18@c367551041 Reviewed-on: https://github.com/flang-compiler/f18/pull/351 Tree-same-pre-rewrite: false
This commit is contained in:
parent
4c2fa097a9
commit
dee4d4be8d
1 changed files with 29 additions and 2 deletions
|
@ -450,8 +450,35 @@ public:
|
|||
private:
|
||||
bool ExpressionHasTypeCategory(const evaluate::GenericExprWrapper &expr,
|
||||
const common::TypeCategory &type) {
|
||||
// TODO - implement
|
||||
return false;
|
||||
return std::visit(
|
||||
common::visitors{
|
||||
[](auto &) { return false; },
|
||||
[=](const evaluate::Expr<
|
||||
evaluate::SomeKind<common::TypeCategory::Integer>> &) {
|
||||
return type == common::TypeCategory::Integer;
|
||||
},
|
||||
[=](const evaluate::Expr<
|
||||
evaluate::SomeKind<common::TypeCategory::Real>> &) {
|
||||
return type == common::TypeCategory::Real;
|
||||
},
|
||||
[=](const evaluate::Expr<
|
||||
evaluate::SomeKind<common::TypeCategory::Complex>> &) {
|
||||
return type == common::TypeCategory::Complex;
|
||||
},
|
||||
[=](const evaluate::Expr<
|
||||
evaluate::SomeKind<common::TypeCategory::Character>> &) {
|
||||
return type == common::TypeCategory::Character;
|
||||
},
|
||||
[=](const evaluate::Expr<
|
||||
evaluate::SomeKind<common::TypeCategory::Logical>> &) {
|
||||
return type == common::TypeCategory::Logical;
|
||||
},
|
||||
[=](const evaluate::Expr<
|
||||
evaluate::SomeKind<common::TypeCategory::Derived>> &) {
|
||||
return type == common::TypeCategory::Derived;
|
||||
},
|
||||
},
|
||||
expr.v.u);
|
||||
}
|
||||
bool InnermostEnclosingScope(const semantics::Symbol &symbol) const {
|
||||
// TODO - implement
|
||||
|
|
Loading…
Reference in a new issue