Skip to content

Commit 659ce6f

Browse files
committed
Rust: fix CodeQL alert
1 parent b4bb24a commit 659ce6f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rust/ql/lib/codeql/rust/controlflow/internal/ControlFlowGraphImpl.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,9 @@ class MacroCallTree extends ControlFlowTree instanceof MacroCall {
413413
override predicate last(AstNode last, Completion c) {
414414
last(super.getExpanded(), last, c)
415415
or
416-
not exists(super.getExpanded()) and last = this
416+
not exists(super.getExpanded()) and
417+
last = this and
418+
completionIsValidFor(c, last)
417419
}
418420

419421
override predicate succ(AstNode pred, AstNode succ, Completion c) { none() }

0 commit comments

Comments
 (0)