File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
python/ql/lib/semmle/python/types Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -439,6 +439,21 @@ class ExceptFlowNode extends ControlFlowNode {
439
439
}
440
440
}
441
441
442
+ /** The ControlFlowNode for an 'except*' statement. */
443
+ class ExceptGroupFlowNode extends ControlFlowNode {
444
+ ExceptGroupFlowNode ( ) { this .getNode ( ) instanceof ExceptGroupStmt }
445
+
446
+ ControlFlowNode getType ( ) {
447
+ this .getBasicBlock ( ) .dominates ( result .getBasicBlock ( ) ) and
448
+ result = this .getNode ( ) .( ExceptGroupStmt ) .getType ( ) .getAFlowNode ( )
449
+ }
450
+
451
+ ControlFlowNode getName ( ) {
452
+ this .getBasicBlock ( ) .dominates ( result .getBasicBlock ( ) ) and
453
+ result = this .getNode ( ) .( ExceptGroupStmt ) .getName ( ) .getAFlowNode ( )
454
+ }
455
+ }
456
+
442
457
private ControlFlowNode element_from_tuple_objectapi ( Object tuple ) {
443
458
exists ( Tuple t | t = tuple .getOrigin ( ) and result = t .getAnElt ( ) .getAFlowNode ( ) )
444
459
}
You can’t perform that action at this time.
0 commit comments