Skip to content

Commit 2e175ba

Browse files
committed
Undo unnecessary code changes
1 parent 95c8541 commit 2e175ba

1 file changed

Lines changed: 3 additions & 13 deletions

File tree

shared/controlflow/codeql/controlflow/ControlFlowGraph.qll

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1950,11 +1950,8 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
19501950
* an `AstNode` that does not otherwise have explicitly defined control
19511951
* flow.
19521952
*/
1953-
private predicate defaultStepCandidate(
1954-
AstNode ast, PreControlFlowNode n1, PreControlFlowNode n2
1955-
) {
1956-
defaultCfg(ast) and
1957-
(
1953+
private predicate defaultStep(PreControlFlowNode n1, PreControlFlowNode n2) {
1954+
exists(AstNode ast | defaultCfg(ast) |
19581955
n1.isBefore(ast) and
19591956
n2.isBefore(getRankedChild(ast, 1))
19601957
or
@@ -1981,11 +1978,6 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
19811978
)
19821979
}
19831980

1984-
/** Holds if `n1` to `n2` is a default left-to-right evaluation step. */
1985-
private predicate defaultStep(PreControlFlowNode n1, PreControlFlowNode n2) {
1986-
defaultStepCandidate(_, n1, n2)
1987-
}
1988-
19891981
/** Holds if there is a local non-abrupt step from `n1` to `n2`. */
19901982
private predicate step(PreControlFlowNode n1, PreControlFlowNode n2) {
19911983
explicitStep(n1, n2) or defaultStep(n1, n2)
@@ -2032,9 +2024,7 @@ module Make0<LocationSig Location, AstSig<Location> Ast> {
20322024
t instanceof DirectSuccessor
20332025
or
20342026
exists(AstNode ast, AbruptCompletion c |
2035-
last(ast, n1, c) and
2036-
endAbruptCompletion(ast, n2, c) and
2037-
t = c.getSuccessorType()
2027+
last(ast, n1, c) and endAbruptCompletion(ast, n2, c) and t = c.getSuccessorType()
20382028
)
20392029
}
20402030

0 commit comments

Comments
 (0)