mirror of
https://github.com/github/codeql.git
synced 2026-04-24 00:05:14 +02:00
Python: Moves non_local_control_flow to new API, and fixes bug in ClassValue implementation
This commit is contained in:
@@ -31,7 +31,7 @@ predicate no_comment(ExceptStmt ex) {
|
||||
}
|
||||
|
||||
predicate non_local_control_flow(ExceptStmt ex) {
|
||||
ex.getType().refersTo(theStopIterationType())
|
||||
ex.getType().pointsTo(ClassValue::stopIteration())
|
||||
}
|
||||
|
||||
predicate try_has_normal_exit(Try try) {
|
||||
|
||||
@@ -839,7 +839,7 @@ module ClassValue {
|
||||
|
||||
/** Get the `ClassValue` for the `StopIteration` class. */
|
||||
ClassValue stopIteration() {
|
||||
result = TBuiltinClassObject(Builtin::special("StopIteration"))
|
||||
result = TBuiltinClassObject(Builtin::builtin("StopIteration"))
|
||||
}
|
||||
|
||||
/** Get the `ClassValue` for the class of modules. */
|
||||
|
||||
Reference in New Issue
Block a user