Address review comments

This commit is contained in:
Tom Hvitved
2024-09-25 09:09:29 +02:00
parent 8d8bbd5b12
commit 6e493f2baa
3 changed files with 2 additions and 10 deletions

View File

@@ -374,9 +374,6 @@ class MatchExprTree extends PostOrderTree instanceof MatchExpr {
or
// Edge from the end of each arm to the match expression.
last(super.getArm(_).getExpr(), pred, c) and succ = this and completionIsNormal(c)
or
// Edge from the end of last arm to the match expression.
last(super.getLastArm().getExpr(), pred, c) and succ = this and completionIsNormal(c)
}
}

View File

@@ -34,7 +34,7 @@ abstract class ConditionalSuccessorImpl extends SuccessorTypeImpl {
boolean value;
bindingset[value]
ConditionalSuccessorImpl() { any() }
ConditionalSuccessorImpl() { exists(value) }
/** Gets the Boolean value of this successor. */
boolean getValue() { result = value }

View File

@@ -41,11 +41,6 @@ module Impl {
/**
* Gets the number of arms of this match expression.
*/
int getNumberOfArms() { result = count(int i | exists(this.getArm(i))) }
/**
* Gets the last arm of this match expression.
*/
MatchArm getLastArm() { result = this.getArm(this.getNumberOfArms() - 1) }
int getNumberOfArms() { result = this.getMatchArmList().getNumberOfArms() }
}
}