File tree Expand file tree Collapse file tree
python/ql/lib/semmle/python/types Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -439,6 +439,21 @@ class ExceptFlowNode extends ControlFlowNode {
439439 }
440440}
441441
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+
442457private ControlFlowNode element_from_tuple_objectapi ( Object tuple ) {
443458 exists ( Tuple t | t = tuple .getOrigin ( ) and result = t .getAnElt ( ) .getAFlowNode ( ) )
444459}
You can’t perform that action at this time.
0 commit comments