Update python/ql/src/Exceptions/UnguardedNextInGenerator.ql

Co-Authored-By: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
This commit is contained in:
Rebecca Valentine
2020-03-18 14:16:00 -07:00
committed by GitHub
parent 9560c804b8
commit 06f0947318

View File

@@ -29,7 +29,7 @@ predicate call_to_next(CallNode call, ControlFlowNode iter) {
}
predicate call_to_next_has_default(CallNode call) {
exists(call.getArg(1))
exists(call.getArg(1)) or exists(call.getArgByName("default"))
}
predicate guarded_not_empty_sequence(EssaVariable sequence) {
@@ -63,4 +63,3 @@ not exists(Comp comp | comp.contains(call.getNode())) and
not stop_iteration_handled(call)
select call, "Call to next() in a generator"