Skip to content

[flang] Same condtions appear as operands of LAnd. Copy-pasted code. Maybe the second should be isEqual(x.upper(), y.upper()). #61610

Closed
@ustchcs-bugfinder

Description

@ustchcs-bugfinder

isEqual(x.lower(), y.lower()) && isEqual(x.lower(), y.lower());

Current code:

static bool isEqual(const Fortran::evaluate::Substring &x,
                      const Fortran::evaluate::Substring &y) {
    return std::visit(
               [&](const auto &p, const auto &q) { return isEqual(p, q); },
               x.parent(), y.parent()) &&
           isEqual(x.lower(), y.lower()) && isEqual(x.lower(), y.lower()); // ----> Same condition. May be the second should be x.upper()?
  }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions