forked from OSchip/llvm-project
[flang] Simply the test per review comment.
Original-commit: flang-compiler/f18@66ab8bb2aa Reviewed-on: https://github.com/flang-compiler/f18/pull/351
This commit is contained in:
parent
dee4d4be8d
commit
6fce8f1e27
|
@ -450,35 +450,8 @@ public:
|
|||
private:
|
||||
bool ExpressionHasTypeCategory(const evaluate::GenericExprWrapper &expr,
|
||||
const common::TypeCategory &type) {
|
||||
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);
|
||||
auto dynamicType{expr.v.GetType()};
|
||||
return dynamicType.has_value() && dynamicType->category == type;
|
||||
}
|
||||
bool InnermostEnclosingScope(const semantics::Symbol &symbol) const {
|
||||
// TODO - implement
|
||||
|
|
Loading…
Reference in New Issue