forked from OSchip/llvm-project
[flang] readability improvement from Tim
Original-commit: flang-compiler/f18@14179ead7c Reviewed-on: https://github.com/flang-compiler/f18/pull/219
This commit is contained in:
parent
0a56867df9
commit
011e6abd9f
|
@ -87,15 +87,9 @@ static constexpr bool Satisfies(RelationalOperator op, Ordering order) {
|
|||
|
||||
static constexpr bool Satisfies(RelationalOperator op, Relation relation) {
|
||||
switch (relation) {
|
||||
case Relation::Less:
|
||||
return op == RelationalOperator::LT || op == RelationalOperator::LE ||
|
||||
op == RelationalOperator::NE;
|
||||
case Relation::Equal:
|
||||
return op == RelationalOperator::LE || op == RelationalOperator::EQ ||
|
||||
op == RelationalOperator::GE;
|
||||
case Relation::Greater:
|
||||
return op == RelationalOperator::NE || op == RelationalOperator::GE ||
|
||||
op == RelationalOperator::GT;
|
||||
case Relation::Less: return Satisfies(op, Ordering::Less);
|
||||
case Relation::Equal: return Satisfies(op, Ordering::Equal);
|
||||
case Relation::Greater: return Satisfies(op, Ordering::Greater);
|
||||
case Relation::Unordered: return false;
|
||||
}
|
||||
return false; // silence g++ warning
|
||||
|
|
Loading…
Reference in New Issue