Skip to content

Forget to handle Logical Xor expr #5089

Closed
@jievince

Description

@jievince

Please check the FAQ documentation before raising an issue

Describe the bug (required)
image

Forget to handle xor:

 if (condition->isLogicalExpr()) {
    // Case1: OR Expr
    if (conditionType == ExprKind::kLogicalOr) {
      return true;
    }
    // Case2: AND Expr
    if (conditionType == ExprKind::kLogicalAnd &&
        graph::ExpressionUtils::findAny(static_cast<LogicalExpression*>(condition),
                                        {ExprKind::kRelIn})) {
      return true;
    }
    // Check logical operands
    for (auto operand : static_cast<const LogicalExpression*>(condition)->operands()) {
      if (!operand->isRelExpr() || !operand->isLogicalExpr()) {
        return false;
      }
    }
  }

Your Environments (required)

  • OS: uname -a
  • Compiler: g++ --version or clang++ --version
  • CPU: lscpu
  • Commit id (e.g. a3ffc7d8)

How To Reproduce(required)

Steps to reproduce the behavior:

  1. Step 1
  2. Step 2
  3. Step 3

Expected behavior

Additional context

Metadata

Metadata

Assignees

Labels

affects/nonePR/issue: this bug affects none version.process/doneProcess of bugseverity/noneSeverity of bugtype/bugType: something is unexpected

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions